Skip to content

Commit

Permalink
Merge pull request #368 from G8XSU/inc-retries
Browse files Browse the repository at this point in the history
Retry more aggressively in VssStore.
  • Loading branch information
tnull authored Oct 16, 2024
2 parents af5d85a + 2c824ff commit ca6c2fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/io/vss_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ impl VssStore {
pub(crate) fn new(base_url: String, store_id: String, data_encryption_key: [u8; 32]) -> Self {
let runtime = tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap();
let storable_builder = StorableBuilder::new(data_encryption_key, RandEntropySource);
let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(100))
.with_max_attempts(3)
.with_max_total_delay(Duration::from_secs(2))
.with_max_jitter(Duration::from_millis(50))
let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(10))
.with_max_attempts(10)
.with_max_total_delay(Duration::from_secs(15))
.with_max_jitter(Duration::from_millis(10))
.skip_retry_on_error(Box::new(|e: &VssError| {
matches!(
e,
Expand Down

0 comments on commit ca6c2fa

Please sign in to comment.