Skip to content

Storage: Add CloseStreamWriter function - #1382

Closed
aibaars wants to merge 5 commits into
distribution:masterfrom
aibaars:storage-close-stream-writer
Closed

aibaars wants to merge 5 commits into
distribution:masterfrom
aibaars:storage-close-stream-writer

Conversation

@aibaars

@aibaars aibaars commented Jan 21, 2016

Copy link
Copy Markdown
Contributor

This PR is a pre-requisite for #1322, and makes the following modifications to the storage driver API:

  1. Add function CloseWriteStream that indicates the end of an upload session, after a call to this function, no further chunks should be appended.
  2. Ensure that no read operations are attempted on partial uploads (ie no ReadStream/GetContentcalls before CloseWriteStream has been called.

…digested bytes is equal to the current file size

Signed-off-by: Arthur Baars <[email protected]>
… call ReadStream on partial uploads

Signed-off-by: Arthur Baars <[email protected]>
@aibaars
aibaars force-pushed the storage-close-stream-writer branch from 645f922 to 690039a Compare January 21, 2016 14:30
@codecov-io

Copy link
Copy Markdown

Current coverage is 53.87%

Merging #1382 into master will decrease coverage by -4.04% as of 690039a

@@            master   #1382   diff @@
======================================
  Files          123     123       
  Stmts        11156   11149     -7
  Branches       778     709    -69
  Methods          0       0       
======================================
- Hit           6461    6007   -454
+ Partial        778     709    -69
- Missed        3917    4433   +516

Review entire Coverage Diff as of 690039a


Uncovered Suggestions

  1. +0.29% via ...ge/driver/gcs/gcs.go#182...213
  2. +0.25% via ...ge/driver/gcs/gcs.go#85...111
  3. +0.22% via ...ge/driver/gcs/gcs.go#475...498
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@aibaars

aibaars commented Jan 22, 2016

Copy link
Copy Markdown
Contributor Author

@stevvooe Do you have time to take a look at this one?

@BrianBland

Copy link
Copy Markdown
Contributor

@aibaars I like the work you've done here, but could you check out #1395? Sorry to draw this discussion out, but I'd like to make sure we have a clean interface that benefits all the storage drivers.

@stevvooe

stevvooe commented Feb 4, 2016

Copy link
Copy Markdown
Collaborator

@aibaars Sorry for not responding earlier. @BrianBland will be taking over the storage drivers. Feel free to cc me anyways, as I enjoy reading code! 🐹

@aibaars

aibaars commented Feb 5, 2016

Copy link
Copy Markdown
Contributor Author

@stevvooe No problem. I'll close this PR and wait for @BrianBland to refactor the storage driver api.

@aibaars aibaars closed this Feb 5, 2016
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