If resumable digest support is disabled, detct this when closing the blobwriter
and allow the close to continue. Also update the name of the function. Signed-off-by: Richard Scothern <richard.scothern@docker.com>
This commit is contained in:
parent
22e8510f3f
commit
d2e5d5c22c
3 changed files with 5 additions and 5 deletions
|
@ -86,10 +86,10 @@ func (bw *blobWriter) Commit(ctx context.Context, desc distribution.Descriptor)
|
|||
return canonical, nil
|
||||
}
|
||||
|
||||
// Rollback the blob upload process, releasing any resources associated with
|
||||
// Cancel the blob upload process, releasing any resources associated with
|
||||
// the writer and canceling the operation.
|
||||
func (bw *blobWriter) Cancel(ctx context.Context) error {
|
||||
context.GetLogger(ctx).Debug("(*blobWriter).Rollback")
|
||||
context.GetLogger(ctx).Debug("(*blobWriter).Cancel")
|
||||
if err := bw.fileWriter.Cancel(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ func (bw *blobWriter) Close() error {
|
|||
return errors.New("blobwriter close after commit")
|
||||
}
|
||||
|
||||
if err := bw.storeHashState(bw.blobStore.ctx); err != nil {
|
||||
if err := bw.storeHashState(bw.blobStore.ctx); err != nil && err != errResumableDigestNotAvailable {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue