Skip to content

Clean uploads - #1669

Merged
dmcgowan merged 1 commit into
distribution:masterfrom
RichardScothern:close-after-commit
Apr 29, 2016
Merged

dmcgowan merged 1 commit into
distribution:masterfrom
RichardScothern:close-after-commit

Conversation

@RichardScothern

Copy link
Copy Markdown

When a blob upload is committed prevent writing out hashstate in the
subsequent close.

When a blob upload is cancelled close the blobwriter before removing
upload state to ensure old hashstates don't persist.

Signed-off-by: Richard Scothern [email protected]

@codecov-io

Copy link
Copy Markdown

Current coverage is 51.19%

Merging #1669 into master will decrease coverage by -6.70% as of 69e1385

@@            master   #1669   diff @@
======================================
  Files          122     122       
  Stmts        10683   10686     +3
  Branches       840     748    -92
  Methods          0       0       
======================================
- Hit           6185    5471   -714
+ Partial        840     748    -92
- Missed        3658    4467   +809

Review entire Coverage Diff as of 69e1385


Uncovered Suggestions

  1. +0.30% via .../driver/s3-aws/s3.go#732...763
  2. +0.28% via .../driver/s3-aws/s3.go#268...297
  3. +0.22% via .../driver/s3-aws/s3.go#884...906
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@aaronlehmann

Copy link
Copy Markdown

LGTM

Comment thread registry/storage/blobwriter.go Outdated
return err
}

bw.Close()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this error still be ignored or is removeResources after commit already harmless?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe at least log it since it should not be occurring but may be useful to know why a canceled blob exists.

subsequent close.

When a blob upload is cancelled close the blobwriter before removing
upload state to ensure old hashstates don't persist.

Signed-off-by: Richard Scothern <[email protected]>
@dmcgowan

Copy link
Copy Markdown
Collaborator

LGTM

@dmcgowan
dmcgowan merged commit a1d7463 into distribution:master Apr 29, 2016
@RichardScothern
RichardScothern deleted the close-after-commit branch May 20, 2016 21:49
@RichardScothern RichardScothern added this to the Registry/2.5 milestone Jun 13, 2016
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Apr 22, 2021
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants