Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chunked upload of large files to blob #37

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

cjalmeida
Copy link
Contributor

@cjalmeida cjalmeida commented Feb 1, 2020

Bug description:

When uploading large files to blob store, the _upload_chunk implementation actually overwrites the entire file instead of just a single chunk.

This PR fixes that by implementing the _initiate_upload and taking the final arg into account.

@hayesgb
Copy link
Collaborator

hayesgb commented Feb 5, 2020

@cjalmeida -- Can you comment on whether #35 fixes this for you as well?

@cjalmeida
Copy link
Contributor Author

@AlbertDeFusco I'll check and report back.

@cjalmeida
Copy link
Contributor Author

@AlbertDeFusco It does not, the issue is in _upload_chunk calling create_blob_from_bytes. The expected behavior for _upload_chunk is to push a partial block into blob store, create_blob_from_bytes is designed to push an entire file.

An alternative would be to buffer the entire file in-memory for the flush calls except for the final one. But that's not the expected behavior from the user side when calling flush().

@AlbertDeFusco
Copy link
Contributor

Your changes look compatible with mine. #35 does not touch the AzureBlobFile class. I believe these PRs solve different problems.

@cjalmeida
Copy link
Contributor Author

@hayesgb Sorry mentioned wrong @ but Albert helped here :)

@hayesgb hayesgb merged commit d70f28c into fsspec:master Feb 6, 2020
@cjalmeida cjalmeida deleted the fix-chuncked-upload branch February 6, 2020 15:49
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.

None yet

4 participants