Mercurial > hg > orthanc-object-storage
changeset 247:3c64e6768a58
MaxRetries
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Wed, 22 Jul 2026 11:20:16 +0200 |
| parents | 6f6e2f981606 |
| children | f6b54676fa53 a24c76047d26 |
| files | Aws/AwsS3StoragePlugin.cpp NEWS README.md |
| diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Aws/AwsS3StoragePlugin.cpp Thu Jul 16 16:22:07 2026 +0200 +++ b/Aws/AwsS3StoragePlugin.cpp Wed Jul 22 11:20:16 2026 +0200 @@ -30,6 +30,7 @@ #include <aws/s3/model/PutObjectTaggingRequest.h> #include <aws/s3/model/Tag.h> #include <aws/core/auth/AWSCredentialsProvider.h> +#include <aws/core/client/DefaultRetryStrategy.h> #include <aws/core/utils/HashingUtils.h> #include <aws/core/utils/logging/DefaultLogSystem.h> #include <aws/core/utils/logging/DefaultCRTLogSystem.h> @@ -547,6 +548,7 @@ const unsigned int requestTimeout = pluginSection.GetUnsignedIntegerValue("RequestTimeout", 1200); const unsigned int maxConnections = pluginSection.GetUnsignedIntegerValue("MaxConnections", 25); + const unsigned int maxRetries = pluginSection.GetUnsignedIntegerValue("MaxRetries", 10); const bool virtualAddressing = pluginSection.GetBooleanValue("VirtualAddressing", true); const bool enableAwsSdkLogs = pluginSection.GetBooleanValue("EnableAwsSdkLogs", false); const std::string caFile = orthancConfig.GetStringValue("HttpsCACertificates", ""); @@ -578,6 +580,8 @@ configuration.requestTimeoutMs = requestTimeout * 1000; configuration.httpRequestTimeoutMs = requestTimeout * 1000; configuration.maxConnections = maxConnections; + configuration.retryStrategy = Aws::MakeShared<Aws::Client::DefaultRetryStrategy>(ALLOCATION_TAG, maxRetries); + if (!endpoint.empty()) {
--- a/NEWS Thu Jul 16 16:22:07 2026 +0200 +++ b/NEWS Wed Jul 22 11:20:16 2026 +0200 @@ -4,6 +4,8 @@ * AWS plugin: * New configuration "MaxConnections" to define the size of the HTTP connection pool used by the AWS HTTP Client (default is 25). + * New configuration "MaxRetries" to define the number of retries for the AWS HTTP Client + (default is 10). 2026-06-22 - v 2.5.3
--- a/README.md Thu Jul 16 16:22:07 2026 +0200 +++ b/README.md Wed Jul 22 11:20:16 2026 +0200 @@ -132,6 +132,7 @@ "ConnectionTimeout": 30, // optional: connection timeout in seconds "RequestTimeout": 1200, // optional: request timeout in seconds (max time to upload/download a file) "MaxConnections": 25, // optional: number of HTTP connections in the pool used by the AWS HTTP client. + "MaxRetries": 10, // optional: max number of retries for the AWS HTTP client. "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) "StorageEncryption" : {...}, // optional "StorageStructure" : "flat", // optional
