File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 21
21
#include < aws/core/auth/AWSCredentials.h>
22
22
#include < aws/core/client/DefaultRetryStrategy.h>
23
23
#include < aws/s3/S3Client.h>
24
+ #include < bvar/reducer.h>
24
25
#include < gen_cpp/cloud.pb.h>
25
26
26
27
#include < algorithm>
42
43
#include " recycler/storage_vault_accessor.h"
43
44
44
45
namespace {
46
+
47
+ bvar::Adder<uint64_t > too_many_request_http_retry_times (" too_many_request_http_retry_times" );
48
+
45
49
class CustomRetryStrategy final : public Aws::Client::DefaultRetryStrategy {
46
50
public:
47
51
CustomRetryStrategy (int maxRetries) : DefaultRetryStrategy(maxRetries) {}
@@ -50,6 +54,7 @@ class CustomRetryStrategy final : public Aws::Client::DefaultRetryStrategy {
50
54
long attemptedRetries) const override {
51
55
if (attemptedRetries < m_maxRetries &&
52
56
error.GetResponseCode () == Aws::Http::HttpResponseCode::TOO_MANY_REQUESTS) {
57
+ too_many_request_http_retry_times << 1 ;
53
58
return true ;
54
59
}
55
60
return Aws::Client::DefaultRetryStrategy::ShouldRetry (error, attemptedRetries);
You can’t perform that action at this time.
0 commit comments