-
-
Notifications
You must be signed in to change notification settings - Fork 859
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 data-corruption issue with s3boto and s3boto3 multipart uploads #504
Conversation
part upload. Fixes jschneier#364, similar issue to jschneier#160 for s3boto3. Inspired by vinayinvicible's fix for jschneier#160.
* `At least two spaces before inline comment (E261)` * `Imports are incorrectly sorted.`
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
=========================================
+ Coverage 76.1% 76.41% +0.3%
=========================================
Files 11 11
Lines 1578 1590 +12
=========================================
+ Hits 1201 1215 +14
+ Misses 377 375 -2
Continue to review full report at Codecov.
|
Taking a look at this one now. |
@jschneier, thanks for looking at this so quickly. You're going to hate me, but these changes introduce a memory leak because the temporary file is never truncated. I'm working on another PR right now to correct the problem. Sorry! |
No hate here! Best to get all the bugs out. Seems like a pain to write a test to cover that.
… On Jun 3, 2018, at 7:26 PM, jnm ***@***.***> wrote:
@jschneier <https://github.com/jschneier>, thanks for looking at this so quickly. You're going to hate me, but these changes introduce a memory leak because the temporary file is never truncated. I'm working on another PR right now to correct the problem. Sorry!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#504 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ACJB2MQgwqrURAlvgCQVx2hy-efZpraqks5t5HC_gaJpZM4UUKot>.
|
by truncating the buffer after uploading it. Follows the approach of jschneier#169.
Thanks. Here's what I've got: #506. This time, I tried creating a 10GB ZIP on the fly and streaming it to S3 before making the PR :) It seems to work well. |
…schneier#504) * fix for files with size more than buffer size fixes jschneier#160 * fix(s3bot3): spool buffer file to end of all uploaded parts after each part upload. Fixes jschneier#364, similar issue to jschneier#160 for s3boto3. Inspired by vinayinvicible's fix for jschneier#160. * Fix style issues flagged by flake8 * `At least two spaces before inline comment (E261)` * `Imports are incorrectly sorted.` * Fix s3boto3 test incompatibility with Python 3.4
This is a consolidation of #197 and #365 with merge conflicts resolved and
flake8
niggles addressed. All credit for the fixes belongs to @vinayinvicible and @tommwatson.Since the data-corruption problem is long-standing and severe, please consider merging these fixes and their included unit tests. If there are any issues with the proposed changes that make you hesitate to merge, please bring them up candidly—I'll work to address them ASAP!
I believe that this PR should:
s3boto3.py
are corrupt. #449Additionally, #450 is related but cannot be closed by this PR because it also addresses #383, which is a separate issue about file reading.