Skip to content

Add ranged readBlob to S3BlobContainer #51137

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

Merged

Conversation

ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Jan 17, 2020

Implements InputStream readBlob(final String blobName, final long position, final int length) on the S3BlobContainer.

@ywelsch ywelsch added >enhancement :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs labels Jan 17, 2020
@ywelsch ywelsch requested review from tlrx and DaveCTurner January 17, 2020 09:02
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM - I left minor comments, most of them can be addressed or ignored as you wish. One is about the name of a blob in a test that needs to be fixed.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

I left a handful of small comments.

I think we should have a test that it is safe to close the stream even if it has not been fully consumed. In earlier experiments we saw some suggestion that the SDK might behave badly if that happens, maybe not recycling the underlying connection properly. If so, we should be sure to consume the whole stream ourselves on close.

@ywelsch
Copy link
Contributor Author

ywelsch commented Jan 17, 2020

I think we should have a test that it is safe to close the stream even if it has not been fully consumed. In earlier experiments we saw some suggestion that the SDK might behave badly if that happens, maybe not recycling the underlying connection properly. If so, we should be sure to consume the whole stream ourselves on close.

I've addressed this in ff4361f. It's a larger follow-up change though.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM except one minor nit, and apparently there's a test failure too.

@ywelsch ywelsch merged commit e419d91 into elastic:feature/searchable-snapshots Jan 21, 2020
@DaveCTurner DaveCTurner mentioned this pull request Feb 6, 2020
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants