Skip to content

Commit 511b24e

Browse files
committed
Bump VSS retrying params
1 parent 05d270a commit 511b24e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/io/vss_store.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,22 @@ use vss_client::types::{
2929
};
3030
use vss_client::util::key_obfuscator::KeyObfuscator;
3131
use vss_client::util::retry::{
32-
ExponentialBackoffRetryPolicy, FilteredRetryPolicy, JitteredRetryPolicy,
33-
MaxAttemptsRetryPolicy, MaxTotalDelayRetryPolicy, RetryPolicy,
32+
ExponentialBackoffRetryPolicy, FilteredRetryPolicy, MaxAttemptsRetryPolicy,
33+
MaxTotalDelayRetryPolicy, RetryPolicy,
3434
};
3535
use vss_client::util::storable_builder::{EntropySource, StorableBuilder};
3636

3737
use crate::io::utils::check_namespace_key_validity;
3838

3939
type CustomRetryPolicy = FilteredRetryPolicy<
40-
JitteredRetryPolicy<
41-
MaxTotalDelayRetryPolicy<MaxAttemptsRetryPolicy<ExponentialBackoffRetryPolicy<VssError>>>,
42-
>,
40+
MaxTotalDelayRetryPolicy<MaxAttemptsRetryPolicy<ExponentialBackoffRetryPolicy<VssError>>>,
4341
Box<dyn Fn(&VssError) -> bool + 'static + Send + Sync>,
4442
>;
4543

4644
// We set this to a small number of threads that would still allow to make some progress if one
4745
// would hit a blocking case
4846
const INTERNAL_RUNTIME_WORKERS: usize = 2;
49-
const VSS_IO_TIMEOUT: Duration = Duration::from_secs(5);
47+
const VSS_IO_TIMEOUT: Duration = Duration::from_secs(100);
5048

5149
/// A [`KVStoreSync`] implementation that writes to and reads from a [VSS](https://github.com/lightningdevkit/vss-server/blob/main/README.md) backend.
5250
pub struct VssStore {
@@ -335,9 +333,8 @@ impl VssStoreInner {
335333
let key_obfuscator = KeyObfuscator::new(obfuscation_master_key);
336334
let storable_builder = StorableBuilder::new(data_encryption_key, RandEntropySource);
337335
let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(10))
338-
.with_max_attempts(10)
339-
.with_max_total_delay(Duration::from_secs(15))
340-
.with_max_jitter(Duration::from_millis(10))
336+
.with_max_attempts(100)
337+
.with_max_total_delay(VSS_IO_TIMEOUT)
341338
.skip_retry_on_error(Box::new(|e: &VssError| {
342339
matches!(
343340
e,

0 commit comments

Comments
 (0)