Suppress "will retry in N ms" for non-retriable errors
Newer versions of aws-sdk-cpp call CalculateDelayBeforeNextRetry() even for non-retriable errors (like NoSuchKey) whih causes log spam in hydra-queue-runner.
This commit is contained in:
		
							parent
							
								
									00aa7c6705
								
							
						
					
					
						commit
						1c969611ba
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		|  | @ -86,12 +86,13 @@ S3Helper::S3Helper(const string & region) | ||||||
| /* Log AWS retries. */ | /* Log AWS retries. */ | ||||||
| class RetryStrategy : public Aws::Client::DefaultRetryStrategy | class RetryStrategy : public Aws::Client::DefaultRetryStrategy | ||||||
| { | { | ||||||
|     long CalculateDelayBeforeNextRetry(const Aws::Client::AWSError<Aws::Client::CoreErrors>& error, long attemptedRetries) const override |     bool ShouldRetry(const Aws::Client::AWSError<Aws::Client::CoreErrors>& error, long attemptedRetries) const override | ||||||
|     { |     { | ||||||
|         auto res = Aws::Client::DefaultRetryStrategy::CalculateDelayBeforeNextRetry(error, attemptedRetries); |         auto retry = Aws::Client::DefaultRetryStrategy::ShouldRetry(error, attemptedRetries); | ||||||
|  |         if (retry) | ||||||
|             printError("AWS error '%s' (%s), will retry in %d ms", |             printError("AWS error '%s' (%s), will retry in %d ms", | ||||||
|             error.GetExceptionName(), error.GetMessage(), res); |                 error.GetExceptionName(), error.GetMessage(), CalculateDelayBeforeNextRetry(error, attemptedRetries)); | ||||||
|         return res; |         return retry; | ||||||
|     } |     } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue