aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Retry settings are not reflected in s3CrtClient
Describe the bug
To change the "max_retries" of the number of retries from 5, I set retryStrategy in Aws::S3Crt::ClientConfiguration and passed it to a new instance of Aws::S3Crt::S3CrtClient. However, the retry count does not change.
Expected Behavior
The retry strategy set in retryStrategy is enabled, and the number of retries changes.
Current Behavior
The default retry strategy and number of retries are always applied.
Reproduction Steps
Create an instance of Aws::S3Crt::S3CrtClient with retryStrategy and attempt an operation that requires many retries.
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.61
Compiler and Version used
gcc 8.3.1
Operating System and version
RHEL8
Adding all of the same settings in the s3CrtClient was overlooked when it was made. Looking into how complicated this would be to get working
Changing this to a feature request, because this is not how the s3CrtClient was initially designed. Please let us know if you would like this feature added by 👍 the above post.
Hi, Can someone explain how this retry strategy works, i configured timeout configs to 100ms and retry strategy to NO_RETRY. But still i am seeing requests are not getting cancelled and time to get object is more than 1 second.
sample code snippet.
Aws::S3Crt::ClientConfiguration config;
config.httpRequestTimeoutMs = 100;
config.connectTimeoutMs = 100;
config.requestTimeoutMs = 100;
config.crtRetryStrategyConfig.crtRetryStrategyType =
Aws::S3Crt::S3CrtClientConfiguration::CrtRetryStrategyConfig::CrtRetryStrategyType::NO_RETRY;
config.throughputTargetGbps = 1;
config.partSize = 10*1024*1024;
s3_crt_client = Aws::New<Aws::S3Crt::S3CrtClient>("test", config);
aws cpp SDK version : 1.11.408
Could you please indicate which operation was attempted for this issue? I think timeout is not supported for Async operations. GetObjectAsync, CopyObjectAsync will show the issue. GetObject and CopyObject uses async flavor and do a blocking wait internally but timeout is not honored.
Hello,
The support for retry strategy configuration on S3 CRT client has been added. I'm closing this issue as resolved.
By default the selected CRT retry strategy will match the regular SDK retry strategy, with an option to specify exact CRT retry strategy CrtRetryStrategyType or even option to override the factory method creating the retry strategy.
Please refer to the S3CrtClientConfiguration class:
retry config:
https://github.com/aws/aws-sdk-cpp/blob/main/generated/src/aws-cpp-sdk-s3-crt/include/aws/s3-crt/S3CrtClientConfiguration.h#L120
factory method option to override: https://github.com/aws/aws-sdk-cpp/blob/main/generated/src/aws-cpp-sdk-s3-crt/include/aws/s3-crt/S3CrtClientConfiguration.h#L80
Please re-open this issue or submit a new one if you experience an issue with S3 CRT retry strategy config. Should you observe an issue with S3 CRT library, you are welcome to submit an issue directly to that library: https://github.com/awslabs/aws-c-s3/
Best regards, Sergey
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.