Fixed S3 backoff bug

This commit is contained in:
mdecimus
2025-01-16 18:58:02 +01:00
parent bfba299e6b
commit 4901411900
2 changed files with 7 additions and 5 deletions

View File

@@ -390,10 +390,12 @@ fn parse_queue_throttle(config: &mut Config) -> QueueThrottle {
host: Vec::new(),
outbound_concurrency: config
.property_or_default::<usize>("queue.threads.remote", "25")
.unwrap_or(25),
.unwrap_or(25)
.max(1),
local_concurrency: config
.property_or_default::<usize>("queue.threads.local", "10")
.unwrap_or(10),
.unwrap_or(10)
.max(1),
};
let all_throttles = parse_throttle(

View File

@@ -100,7 +100,7 @@ impl S3Store {
500..=599 if retries_left > 0 => {
// wait backoff
tokio::time::sleep(Duration::from_secs(
1 << (self.max_retries - retries_left).max(6),
1 << (self.max_retries - retries_left).min(6),
))
.await;
@@ -130,7 +130,7 @@ impl S3Store {
500..=599 if retries_left > 0 => {
// wait backoff
tokio::time::sleep(Duration::from_secs(
1 << (self.max_retries - retries_left).max(6),
1 << (self.max_retries - retries_left).min(6),
))
.await;
@@ -161,7 +161,7 @@ impl S3Store {
500..=599 if retries_left > 0 => {
// wait backoff
tokio::time::sleep(Duration::from_secs(
1 << (self.max_retries - retries_left).max(6),
1 << (self.max_retries - retries_left).min(6),
))
.await;