Add content gc ref labels from containers, images, and snapshots#3064
Merged
crosbymichael merged 1 commit intocontainerd:masterfrom Mar 7, 2019
Merged
Conversation
Currently the objects which can retain content from labels are limited. This limitation has required clients to work around this and and in some cases add outside reference counting (e.g. buildkit keeping content for snapshots). Updated the logic to treat content and snapshot labels equally and simplified the code in the process. Signed-off-by: Derek McGowan <[email protected]>
1af245d to
7cfb99a
Compare
Codecov Report
@@ Coverage Diff @@
## master #3064 +/- ##
==========================================
+ Coverage 43.46% 43.54% +0.08%
==========================================
Files 103 103
Lines 11033 11015 -18
==========================================
+ Hits 4795 4796 +1
+ Misses 5503 5483 -20
- Partials 735 736 +1
Continue to review full report at Codecov.
|
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the objects which can retain content from labels are limited. This limitation has required clients to work around this and and in some cases add outside reference counting (e.g. buildkit keeping content for snapshots). Updated the logic to treat content and snapshot labels equally and simplified the code in the process.
I would also recommend we consider backporting this to 1.2 since the change is tightly scoped with clearly defined tests. Current GC performance is good enough that any effect based from additional calls (additional cursor seek for every image, container, and snapshot) is negligible and offset by one less seek for each content (single call to sendLabelRefs saves an extra bucket lookup).