-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
Add ranged readBlob to S3BlobContainer #51137
Conversation
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
There was a problem hiding this 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.
...pository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java
Outdated
Show resolved
Hide resolved
...pository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java
Outdated
Show resolved
Hide resolved
...pository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java
Outdated
Show resolved
Hide resolved
...pository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
...ins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java
Show resolved
Hide resolved
...ins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java
Outdated
Show resolved
Hide resolved
...pository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java
Show resolved
Hide resolved
I've addressed this in ff4361f. It's a larger follow-up change though. |
There was a problem hiding this 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.
Implements
InputStream readBlob(final String blobName, final long position, final int length)
on the S3BlobContainer.