-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add failure-tolerance for gc #16094
Conversation
Codecov Report
@@ Coverage Diff @@
## main #16094 +/- ##
==========================================
- Coverage 66.93% 66.91% -0.02%
==========================================
Files 944 944
Lines 78447 78467 +20
Branches 2304 2304
==========================================
+ Hits 52508 52509 +1
- Misses 21891 21907 +16
- Partials 4048 4051 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c1ff6a4
to
0c3de37
Compare
0c3de37
to
b2fe7f3
Compare
38cd60f
to
f390c38
Compare
@@ -265,9 +268,11 @@ func (gc *GarbageCollector) sweep(ctx job.Context) error { | |||
if err := ignoreNotFound(func() error { | |||
return gc.markDeleteFailed(ctx, blob) | |||
}); err != nil { | |||
gc.logger.Errorf("failed to call gc.markDeleteFailed() after v2DeleteManifest() error out: %s, %v", blob.Digest, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the error was recorded in the markDeleteFailed() method, dup here.
@@ -255,6 +257,7 @@ func (gc *GarbageCollector) sweep(ctx job.Context) error { | |||
} | |||
|
|||
// remove tags and revisions of a manifest | |||
skippedBlobs := map[string]interface{}{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool varaible is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
f390c38
to
d2ae016
Compare
Closes: #15469
Closes: #15822
Signed-off-by: Shengwen Yu yshengwen@vmware.com