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 corrupted S3 downloads when file object in append mode #112

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hhamalai
Copy link

@hhamalai hhamalai commented Oct 20, 2018

The DownloadSeekableOutputManager with threading causes file corruption when the output file is opened in append mode.

The file object is still seekable, but only for reads, the writes will be written into the end of the file.

This is also the root cause for boto/boto3#1446, and fixes the issue.

@@ -24,7 +24,7 @@
ReadTimeoutError

from s3transfer.compat import SOCKET_ERROR
from s3transfer.compat import seekable
from s3transfer.compat import seekable, writes_are_seekable
Copy link

Choose a reason for hiding this comment

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

Just a fly-by comment here, but unless I'm missing something, you don't actually call this writes_are_seekable() function anywhere, so how does this fix the problem?

Copy link
Author

Choose a reason for hiding this comment

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

Excellent that someone is awake, added the missing call from my staging 👍

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

2 participants