Skip to content

Commit

Permalink
docs[object_store]: clarify the backoff strategy that is actually imp…
Browse files Browse the repository at this point in the history
…lemented (#6325)

* Clarify the backoff strategy that is actually implemented

* Update object_store/src/client/backoff.rs

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>

---------

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
  • Loading branch information
westonpace and tustvold authored Aug 29, 2024
1 parent a937869 commit 6785170
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions object_store/src/client/backoff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
use rand::prelude::*;
use std::time::Duration;

/// Exponential backoff with jitter
/// Exponential backoff with decorrelated jitter algorithm
///
/// The first backoff will always be `init_backoff`.
///
/// Subsequent backoffs will pick a random value between `init_backoff` and
/// `base * previous` where `previous` is the duration of the previous backoff
///
/// See <https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/>
#[allow(missing_copy_implementations)]
Expand All @@ -28,7 +33,7 @@ pub struct BackoffConfig {
pub init_backoff: Duration,
/// The maximum backoff duration
pub max_backoff: Duration,
/// The base of the exponential to use
/// The multiplier to use for the next backoff duration
pub base: f64,
}

Expand Down

0 comments on commit 6785170

Please sign in to comment.