Skip to content

Add ranged readBlob to S3BlobContainer#51137

Merged
ywelsch merged 9 commits intoelastic:feature/searchable-snapshotsfrom
ywelsch:repo-range-requests
Jan 21, 2020
Merged

Add ranged readBlob to S3BlobContainer#51137
ywelsch merged 9 commits intoelastic:feature/searchable-snapshotsfrom
ywelsch:repo-range-requests

Conversation

@ywelsch
Copy link
Copy Markdown
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/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs labels Jan 17, 2020
@ywelsch ywelsch requested review from DaveCTurner and tlrx January 17, 2020 09:02
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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
Copy Markdown
Member

@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
Copy Markdown
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
Copy Markdown
Member

@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/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