Revert diff/walking error change#5566
Merged
fuweid merged 1 commit intocontainerd:masterfrom Jun 6, 2021
Merged
Conversation
|
Build succeeded.
|
Member
|
Line 121 in 6ae9090 Does it mean that we need to perform roll-back after a Commit failure?eg. if newReference {
if abortErr := s.store.Abort(ctx, config.Reference); abortErr != nil {
log.G(ctx).WithError(abortErr).WithField("ref", config.Reference).Warnf("failed to delete diff upload")
}
}Lines 111 to 117 in 6ae9090 Since if err := cw.Commit(ctx, 0, dgst, commitopts...); err != nil {
if !errdefs.IsAlreadyExists(err) {
errOpen = err
return errors.Wrap(err, "failed to commit")
}
} |
Clarify error scope and create variable for deferring cleanup Signed-off-by: Derek McGowan <[email protected]>
ed56170 to
69f43d4
Compare
Member
Author
I think in this case calling Abort is the best thing to do. Not aborting on Commit failure allows the caller to try again, but that is not relevant here. I updated the code to just use |
|
Build succeeded.
|
thaJeztah
approved these changes
Jun 4, 2021
Member
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM
thanks for the additional comments
fuweid
approved these changes
Jun 6, 2021
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.
Clarify error scope and create variable for deferring cleanup
Reverts #5551