mirror of
https://github.com/distribution/distribution.git
synced 2025-08-28 11:24:05 +00:00
Merge pull request #10 from digitalocean/awg/resume-commit-race
Return a sensible error in races between blob upload completions
This commit is contained in:
commit
1e1c67e13f
@ -210,7 +210,17 @@ func (lbs *linkedBlobStore) Resume(ctx context.Context, id string) (distribution
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return lbs.newBlobUpload(ctx, id, path, startedAt, true)
|
||||
bw, err := lbs.newBlobUpload(ctx, id, path, startedAt, true)
|
||||
if err != nil {
|
||||
switch err := err.(type) {
|
||||
case driver.PathNotFoundError:
|
||||
return nil, distribution.ErrBlobUploadUnknown
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return bw, nil
|
||||
}
|
||||
|
||||
func (lbs *linkedBlobStore) Delete(ctx context.Context, dgst digest.Digest) error {
|
||||
|
Loading…
Reference in New Issue
Block a user