Commit Graph

18 Commits (393bc5b7b07745adfb60b06cf251c1a52caf07ae)

Author SHA1 Message Date
Tonis Tiigi 35fcb28a00 Clean up old TODOs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-14 22:28:08 -07:00
Erik Sipsma a9f1980ebb Refactor cache metadata interface.
There are a few goals with this refactor:
1. Remove external access to fields that no longer make sense and/or
   won't make sense soon due to other potential changes. For example,
   there can now be multiple blobs associated with a ref (for different
   compression types), so the fact that you could access the "Blob"
   field from the Info method on Ref incorrectly implied there was just
   a single blob for the ref. This is on top of the fact that there is
   no need for external access to blob digests.
2. Centralize use of cache metadata inside the cache package.
   Previously, many parts of the code outside the cache package could
   obtain the bolt storage item for any ref and read/write it directly.
   This made it hard to understand what fields are used and when. Now,
   the Metadata method has been removed from the Ref interface and
   replaced with getters+setters for metadata fields we want to expose
   outside the package, which makes it much easier to track and
   understand. Similar changes have been made to the metadata search
   interface.
3. Use a consistent getter+setter interface for metadata, replacing
   the mix of interfaces like Metadata(), Size(), Info() and other
   inconsistencies.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-08-25 19:15:09 +00:00
Tonis Tiigi 976b7e9a97 metadata: hold lock on storageitem update
The locks usage is mixed up because two locks separate locks
are actually needed. With a specific lock, calls to SetValue
can be protected.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-14 20:27:01 -07:00
Tonis Tiigi b62f436771 metadata: clone external data
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-30 13:30:29 -07:00
Erik Sipsma 1b30fd146b cache: Remove ImageRef from DescHandlers
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Tonis Tiigi 7b1bae7a42 solver: support no-cache for exec cache mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-26 14:42:32 -07:00
Tonis Tiigi ed6bbb2bf5 cache: add more error tracing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-06 21:15:21 -07:00
John Howard 2de2c04c8e Revendoring to move boltdb to bbolt
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-18 11:18:08 -07:00
Tonis Tiigi e4f6a5e752 set more tests to parallel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-08 18:19:08 -08:00
Tonis Tiigi 01aaf130e5 solver: refactor to a shared vertex solver model
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-18 13:58:33 -07:00
Tonis Tiigi 8738929b8c solver: implement content based cache support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-08-04 10:03:26 -07:00
Tonis Tiigi ce86ec18bd metadata: add external metadata helpers
External metadata should be used for values that
are too big to be automatically loaded to memory

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-31 18:37:35 -07:00
Derek McGowan 9ce5053a8b Update containerd version
Fix for logrus rename, use fork until fixed in moby.
Removed unused tar stream.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-26 11:07:45 -07:00
Tonis Tiigi eac79f7c7e cache: refactor reference reuse and caching
Replaces previous mutable.Freeze logic with
commits that can live together with mutable data.
Finalize method is added if the implementation
needs to make sure that the immutable ref is
flushed to the driver. Refs are automaitcally
finalized when writable layers are created on
top of them.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-18 16:01:01 -07:00
Tonis Tiigi 25ba9d72de solver: first pass of instruction cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-06 20:42:17 -07:00
Tonis Tiigi 2c5ff4fc59 metadata: switch value encoding to json.RawMessage
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-05 23:32:36 -07:00
Tonis Tiigi 44415841c9 make blobmapping use metadata package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-04 21:55:27 -07:00
Tonis Tiigi 336cfe07fa persistent metadata helpers for snapshots
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-04 21:55:20 -07:00