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

objtools: fix 5GiB+ server-side copies on S3 #9357

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

andyasp
Copy link
Contributor

@andyasp andyasp commented Sep 20, 2024

This is a rebased, fixed, and tested version of #8427. I'm opening a new PR since I let that one rot while it was waiting to be tested (sorry!).

What this PR does

The primary motivation of this change is allowing undelete-blocks to recover very large blocks in S3 where an index object may exceed 5GiB.

A server-side copy on S3 with minio's CopyObject fails if the object is greater than 5GiB in size. When testing the previous PR I found a bug that was fixable by supplying MatchRange: true in the srcOptions for ComposeObject. Upon further inspection I realized the byte ranges don't need to be created at all because ComposeObject already handles it.

I commented that I don't think this approach works cross-region. The minio code tries to double check the source object size rather than allowing it to be supplied, but it unfortunately uses the destination client while doing so. Our test buckets don't work in that particular scenario anyway for other reasons so I was unable to directly verify this.

Manually tested using copyprefix to copy a 6GiB object from one prefix to another. It fails before this change and succeeds with it. A sha256 of the content of the copied object matched the source.

Which issue(s) this PR fixes or relates to

Fixes https://github.com/grafana/mimir-squad/issues/2163

Checklist

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

@andyasp andyasp requested a review from a team as a code owner September 20, 2024 19:49
@andyasp andyasp merged commit 685e06d into main Sep 23, 2024
29 checks passed
@andyasp andyasp deleted the aasp/s3-large-copy-fix branch September 23, 2024 14:29
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.

2 participants