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]

damnever and others added 2 commits March 19, 2023 14:12
…ory allocations (cortexproject#5213)

Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
…mize memory allocations (cortexproject#5213)"

This reverts commit 4821ba3.

Signed-off-by: Alex Le <leqiyue@amazon.com>
@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 <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
@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.

None yet

6 participants