Skip to content

BlobContainer: add copyBlob method (8.x) #126558

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

Closed
wants to merge 4 commits into from
Closed

Conversation

bcully
Copy link
Contributor

@bcully bcully commented Apr 9, 2025

This is a backport of #125737 to 8.x.

The copyBlob feature isn't expected to have any users in 8.x, but this may make it easier to backport the AWS SDKv2 changes that are incoming. Additionally it includes some coverage of copyBlob in the repository analyzer which may let it provide feedback on the suitability of the object store for 9.x before upgrade (though it may also trigger new warnings against an existing blob store that had previously passed, for users that upgrade to 8.19).

I'm not personally sure this backport is worthwhile given the amount of dead code it will bring along, but making that decision might be easier with something concrete to look at.

DaveCTurner and others added 2 commits April 9, 2025 10:50
It's possible that the client config, particularly its credentials,
might change in the middle of a long-running operation such as a large
multipart upload. Prior to this commit we would hold onto the same
`AmazonS3` instance for the entire operation, but really there's no need
to do so, we can obtain a potentially-fresher instance for each API
call.

(cherry picked from commit 09d4217)
If a container implements copyBlob, then the copy is
performed by the store, without client-side IO. If the store
does not provide a copy operation then the default implementation
throws UnsupportedOperationException.

This change provides implementations for the FS and S3 blob containers.
More will follow.

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: David Turner <[email protected]>
(cherry picked from commit c1a71ff)
@bcully bcully added >non-issue v8.19.0 :Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. labels Apr 9, 2025
@bcully bcully requested a review from DaveCTurner April 9, 2025 19:04
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label Apr 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

@bcully
Copy link
Contributor Author

bcully commented Apr 9, 2025

If we do take it, I suppose we'll have to forward port the transport versions change to main first.

DaveCTurner and others added 2 commits April 10, 2025 13:23
- Translate a 404 during a multipart copy into a `FileNotFoundException`

- Use multiple threads in `S3HttpHandler` to avoid `CopyObject`/`PutObject` deadlock

Closes elastic#126576

(cherry picked from commit b10b35f)
@bcully
Copy link
Contributor Author

bcully commented Apr 14, 2025

I suppose we'd want to backport to 9.0 as well if we did this? I kind of forgot about the current state of backport branches.

@DaveCTurner
Copy link
Contributor

9.0 will live for much less time than 8.18 (and won't receive the SDKv2 upgrade) so I wouldn't expect to backport this there.

However having played around with these changes I think it will work out ok to backport the SDKv2 upgrade without copyBlob support in 8.18, and we don't technically need copyBlob support in 8.18, so it probably makes sense to close this.

@bcully
Copy link
Contributor Author

bcully commented Apr 14, 2025

Doesn't seem worth backporting at this time.

@bcully bcully closed this Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. >non-issue Team:Distributed Coordination Meta label for Distributed Coordination team v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants