Skip to content

Commit

Permalink
layer store: Handle volatile and transient layer
Browse files Browse the repository at this point in the history
We store information about the layers in two files, layers.json and
volatile-layers.json. This allows us to treat the two stores
differently, for example saving the volatile json with the NoSync
option, which is faster (but less robust).

In normal mode we store only layers for the containers that are marked
volatile (`--rm`), as these are not expected to persist anyway. This way
informantion about such containers are faster to save, and in case
of an unclean shutdown we only risk loss of information about other
such volatile containers.

In transient mode *all* container layers are stored in the volatile
json, and additionally it (and the corresponding lock file) are stored
in tmpfs, thus both improving performance and automatically making
sure no container layers are persisted across boots.

Signed-off-by: Alexander Larsson <[email protected]>
  • Loading branch information
alexlarsson committed Nov 10, 2022
1 parent 9beea58 commit 0a42390
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 102 deletions.
Loading

0 comments on commit 0a42390

Please sign in to comment.