Fixed S3 backoff bug
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user