Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 8d6215f

Browse files
author
Guihao Liang
authored
get the retry logic back (#3114)
1 parent 58a8ea4 commit 8d6215f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/storage/fileio/s3_api.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ S3Client init_aws_sdk_with_turi_env(s3url& parsed_url) {
128128
Aws::Client::ClientConfiguration clientConfiguration;
129129

130130
// a little bit too long, anyway
131-
clientConfiguration.requestTimeoutMs = 2 * 60000;
131+
clientConfiguration.requestTimeoutMs = 5 * 60000;
132132
clientConfiguration.connectTimeoutMs = 20000;
133133

134134
if (turi::fileio::insecure_ssl_cert_checks()) {
@@ -513,8 +513,10 @@ list_objects_response list_objects_impl(s3url parsed_url, std::string proxy,
513513

514514
} else {
515515
auto error = outcome.GetError();
516-
517-
if (error.ShouldRetry()) {
516+
// Unlike CoreErrors, S3Error Never retries. Use Http code instead.
517+
// check aws-cpp-sdk-s3/source/S3Error.cpp
518+
if (error.GetResponseCode() ==
519+
Aws::Http::HttpResponseCode::TOO_MANY_REQUESTS) {
518520
n_retry++;
519521

520522
if (n_retry == 3) {

0 commit comments

Comments
 (0)