[release/1.0] metadata: image removal triggers GC#2018
Merged
estesp merged 2 commits intocontainerd:release/1.0from Jan 18, 2018
Merged
[release/1.0] metadata: image removal triggers GC#2018estesp merged 2 commits intocontainerd:release/1.0from
estesp merged 2 commits intocontainerd:release/1.0from
Conversation
Directly get and check whether a bucket is empty. This prevents unnecessarily loading all records of the buckets into memory just to check existence. Also added checks for content and snapshots. Signed-off-by: Derek McGowan <[email protected]>
The boltdb image store now manages its own transactions when one is not provided, but allows the caller to pass in a transaction through the context. This makes the image store more similar to the content and snapshot stores. Additionally, use the reference to the metadata database to mark the content store as dirty after an image has been deleted. The deletion of an image means a reference to a piece of content is gone and therefore garbage collection should be run to check if any resources can be cleaned up as a result. Signed-off-by: Derek McGowan <[email protected]>
058b115 to
d04746b
Compare
Codecov Report
@@ Coverage Diff @@
## release/1.0 #2018 +/- ##
===============================================
- Coverage 50.59% 50.59% -0.01%
===============================================
Files 81 81
Lines 7137 7165 +28
===============================================
+ Hits 3611 3625 +14
- Misses 2835 2847 +12
- Partials 691 693 +2
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.
Backport of #1960
This includes some minor refactoring to fix the original bug. Includes more test coverage.