Skip to content

Add content gc ref labels from containers, images, and snapshots#3064

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
dmcgowan:update-gc-content-references
Mar 7, 2019
Merged

Add content gc ref labels from containers, images, and snapshots#3064
crosbymichael merged 1 commit intocontainerd:masterfrom
dmcgowan:update-gc-content-references

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

@dmcgowan dmcgowan commented Mar 4, 2019

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).

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]>
@dmcgowan dmcgowan force-pushed the update-gc-content-references branch from 1af245d to 7cfb99a Compare March 4, 2019 22:51
@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 4, 2019

Codecov Report

Merging #3064 into master will increase coverage by 0.08%.
The diff coverage is 94.87%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#linux 47.52% <93.93%> (+0.03%) ⬆️
#windows 40.37% <94.87%> (+0.08%) ⬆️
Impacted Files Coverage Δ
metadata/gc.go 64.95% <94.87%> (+3.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30b6f46...7cfb99a. Read the comment docs.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit cfba7ef into containerd:master Mar 7, 2019
@dmcgowan dmcgowan deleted the update-gc-content-references branch September 10, 2019 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants