Skip to content

Commit 9308401

Browse files
[opt](s3client) Set ClientConfiguration.requestTimeoutMs default value from 3000ms to 30000ms (#49315)
* ClientConfiguration.requestTimeoutMs default is 3000ms in `aws-sdk-cpp`, this should be more than adequate for most services. However, we meet problem when cloud provider's storage service or network not stable * refer to https://github.com/aws/aws-sdk-cpp/blob/main/src/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h
1 parent ee789fe commit 9308401

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

be/src/util/s3_util.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,11 @@ std::shared_ptr<io::ObjStorageClient> S3ClientFactory::_create_s3_client(
297297
#endif
298298
}
299299

300+
aws_config.requestTimeoutMs = 30000;
300301
if (s3_conf.request_timeout_ms > 0) {
301302
aws_config.requestTimeoutMs = s3_conf.request_timeout_ms;
302303
}
304+
303305
if (s3_conf.connect_timeout_ms > 0) {
304306
aws_config.connectTimeoutMs = s3_conf.connect_timeout_ms;
305307
}

0 commit comments

Comments
 (0)