Skip to content

Commit 9a6f5c6

Browse files
committed
Add timebomb to ensure we remove this when no longer necessary
1 parent 0e396dc commit 9a6f5c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java

+6
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@
2626
import org.apache.logging.log4j.Logger;
2727
import org.apache.logging.log4j.message.ParameterizedMessage;
2828
import org.elasticsearch.core.internal.io.IOUtils;
29+
import org.elasticsearch.Version;
2930

3031
import java.io.IOException;
3132
import java.io.InputStream;
3233
import java.nio.file.NoSuchFileException;
3334

35+
/**
36+
* Wrapper around an S3 object that will retry the {@link GetObjectRequest} if the download fails part-way through, resuming from where
37+
* the failure occurred. This should be handled by the SDK but it isn't today. This should be revisited in the future (e.g. before removing
38+
* the {@link Version#V_7_0_0} version constant) and removed when the SDK handles retries itself.
39+
*/
3440
class S3RetryingInputStream extends InputStream {
3541

3642
private static final Logger logger = LogManager.getLogger(S3RetryingInputStream.class);

0 commit comments

Comments
 (0)