llbsolver: move history blobs to a separate namespace#3833
Conversation
a4a6eb8 to
bc3443a
Compare
Migrate history objects to separate namespace to holding reference to a blob does not interfer with the GC labels held for same blobs by the containerd image store. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Linter does not understand these and shows bogus warnings. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
bc3443a to
f5ca0c5
Compare
|
I rebased this after #3827 was merged. |
crazy-max
left a comment
There was a problem hiding this comment.
I was a bit worried about the migration at init but it's quite fast, even for large history.
The data doesn't actually move. It is just juggling with the lease objects. |
vvoland
left a comment
There was a problem hiding this comment.
LGTM; tested with Moby and it seems to resolve the issue with not being able to GC blobs.
| type nsFallbackStore struct { | ||
| main *Store | ||
| fb *Store | ||
| } |
There was a problem hiding this comment.
Out of curiosity, could we potentially use an implementation that was more similar to the content store multiplexing we already have in buildkit (added in #615)?
On the client:
buildkit/session/content/attachable.go
Lines 21 to 41 in 8dd5f87
On the server:
buildkit/session/content/caller.go
Lines 16 to 31 in 8dd5f87
I think we need to still need to have the fallback store as the default, to emulate v0.11 buildkit behavior, but I think maybe moving forwards the client should be able to dictate which store to use?
Migrate history objects to separate namespace to holding
reference to a blob does not interfere with the GC labels
held for the same blobs by the containerd image store.
fixes #3797
@vvoland