Skip to content

Blobwriter: call BlobWriter.Size after BlobWriter.Close - #1706

Merged
RichardScothern merged 3 commits into
distribution:masterfrom
aibaars:registry-size-close
Jun 13, 2016
Merged

RichardScothern merged 3 commits into
distribution:masterfrom
aibaars:registry-size-close

Conversation

@aibaars

@aibaars aibaars commented May 5, 2016 •

Copy link
Copy Markdown
Contributor

@RichardScothern @aaronlehmann This is a patch for #1698 as alternative to #1703 . In contrast to #1703 this PR attempts to fix the root cause (ie a call of Size on an upload that is not (fully) flushed to the backing storage.

The first commit changes the tests so they fail when Size is called on a "dirty" writer. The second commit ensures that Size is not called before Close when committing an upload. The third commit addresses the case where Cancel is called after closing an upload. The Cancel operation used to fail in that case.

@codecov-io

codecov-io commented May 6, 2016 •

Copy link
Copy Markdown

Current coverage is 59.90%

Merging #1706 into master will decrease coverage by -7.68%

  1. 3 files (not in diff) in ...istry/storage/driver were modified. more
    • Misses +807
    • Hits -807
  2. 2 files (not in diff) in registry/storage were modified. more
    • Misses +1
    • Hits -1
  3. 2 files (not in diff) in registry were modified. more
    • Misses +6
    • Hits -6
@@             master      #1706   diff @@
==========================================
  Files           121        121          
  Lines         10578      10574     -4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           7149       6334   -815   
- Misses         3429       4240   +811   
  Partials          0          0          

Powered by Codecov. Last updated by 4ecea4b...b87895a

@aibaars
aibaars force-pushed the registry-size-close branch from ff1e0c6 to 167fb4c Compare May 6, 2016 11:30
@aibaars
aibaars force-pushed the registry-size-close branch from 167fb4c to eca581c Compare May 6, 2016 12:04
@aibaars

aibaars commented May 6, 2016

Copy link
Copy Markdown
Contributor Author

@RichardScothern I changed the app and api tests to use a modified version of the inmemory driver that simulates buffering. This way the test suite can reproduce the error.

@RichardScothern

Copy link
Copy Markdown

Nice one @aibaars . I'm going to test this against the whole driver suite

@RichardScothern

Copy link
Copy Markdown

LGTM based on my testing on S3, GCS and swift

@RichardScothern RichardScothern added this to the Registry/2.5 milestone Jun 13, 2016
@RichardScothern
RichardScothern merged commit 1fc752c into distribution:master Jun 13, 2016
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Apr 22, 2021
Blobwriter: call BlobWriter.Size after BlobWriter.Close
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Jan 19, 2022
Blobwriter: call BlobWriter.Size after BlobWriter.Close
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.

4 participants