Skip to content

Commit c259da5

Browse files
authored
Retry ListObjectsV2Request when pulling segments. (#18821)
1 parent ef46541 commit c259da5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ FileUtils.FileCopyResult getSegmentFiles(final CloudObjectLocation s3Coords, fin
112112
return result;
113113
} else if (s3Coords.getPath().endsWith("/")) {
114114
// segment is not compressed, list objects and pull them all
115-
final ListObjectsV2Result list = s3Client.listObjectsV2(
116-
new ListObjectsV2Request().withBucketName(s3Coords.getBucket())
117-
.withPrefix(s3Coords.getPath())
115+
final ListObjectsV2Result list = S3Utils.retryS3Operation(
116+
() -> s3Client.listObjectsV2(
117+
new ListObjectsV2Request().withBucketName(s3Coords.getBucket())
118+
.withPrefix(s3Coords.getPath())
119+
)
118120
);
119121
FileUtils.FileCopyResult copyResult = new FileUtils.FileCopyResult();
120122
for (S3ObjectSummary objectSummary : list.getObjectSummaries()) {

0 commit comments

Comments
 (0)