Update metadata interfaces for containers and leases#3668
Update metadata interfaces for containers and leases#3668estesp merged 1 commit intocontainerd:masterfrom
Conversation
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3668 +/- ##
========================================
+ Coverage 42% 42.1% +0.1%
========================================
Files 129 129
Lines 14275 14307 +32
========================================
+ Hits 5996 6024 +28
- Misses 7379 7383 +4
Partials 900 900
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
it seems that it is better to update dirty field after Delete successfully
There was a problem hiding this comment.
This delete will return nil if the key doesn't exist, so then is it better to check whether the key exists before deleting?
There was a problem hiding this comment.
I think that the dirty should be set if the bkt is not nil.
|
The change looks great ! |
|
Nice, I was looking at these services the other day and wondering why they took the database directly |
There was a problem hiding this comment.
I think we're loosing err result from DeleteBucket here. Since DeleteBucket is wrapped with if, it's errresult is visible inside that if block.
And this return err captured from NamespaceRequired return and will always be nil here.
There was a problem hiding this comment.
Yep, you are right! I didn't even notice that, the code was wrong before. I don't think there is any chance for that err to be set so it was never seen, but still very wrong. Updating.
Add more thorough dirty checking across all types which may be deleted and hold references. Signed-off-by: Derek McGowan <[email protected]>
4b424b4 to
0b224ac
Compare
|
Build succeeded.
|
Add more thorough dirty checking across all types which may be deleted and hold references. This ensures that lease and container deletion will trigger a GC. Additionally it will prevent an image deletion from triggering a content store GC when no content is removed (such as images with multiple names).