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 S3 BucketWithRetries upload empty content issue #5217

Merged
merged 9 commits into from
Mar 20, 2023

Conversation

alexqyle
Copy link
Contributor

@alexqyle alexqyle commented Mar 19, 2023

What this PR does:
BucketWithRetries for S3 reused the same Reader inside retry logic which caused empty content got uploaded during retry. This PR should fix this problem by only retrying upload operation if the input Reader is seekable.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@alexqyle alexqyle force-pushed the s3-upload-retry-issue branch from 0c7c441 to 5a5e662 Compare March 19, 2023 21:13
Signed-off-by: Alex Le <[email protected]>
…mize memory allocations (cortexproject#5213)"

This reverts commit 4821ba3.

Signed-off-by: Alex Le <[email protected]>
@alexqyle alexqyle marked this pull request as ready for review March 20, 2023 08:05
@alanprot
Copy link
Member

Good catch! Thanks for fixing it

Signed-off-by: Alex Le <[email protected]>
Signed-off-by: Alex Le <[email protected]>
@alanprot alanprot requested review from alvinlin123 and yeya24 March 20, 2023 22:37
@alvinlin123 alvinlin123 merged commit 37f6451 into cortexproject:master Mar 20, 2023
@alexqyle alexqyle deleted the s3-upload-retry-issue branch March 21, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants