Skip to content

Commit e94fe69

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

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/io/vss_store.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,21 @@ 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, MaxTotalDelayRetryPolicy, RetryPolicy,
3433
};
3534
use vss_client::util::storable_builder::{EntropySource, StorableBuilder};
3635

3736
use crate::io::utils::check_namespace_key_validity;
3837

3938
type CustomRetryPolicy = FilteredRetryPolicy<
40-
JitteredRetryPolicy<
41-
MaxTotalDelayRetryPolicy<MaxAttemptsRetryPolicy<ExponentialBackoffRetryPolicy<VssError>>>,
42-
>,
39+
MaxTotalDelayRetryPolicy<ExponentialBackoffRetryPolicy<VssError>>,
4340
Box<dyn Fn(&VssError) -> bool + 'static + Send + Sync>,
4441
>;
4542

4643
// We set this to a small number of threads that would still allow to make some progress if one
4744
// would hit a blocking case
4845
const INTERNAL_RUNTIME_WORKERS: usize = 2;
49-
const VSS_IO_TIMEOUT: Duration = Duration::from_secs(5);
46+
const VSS_IO_TIMEOUT: Duration = Duration::from_secs(20);
5047

5148
/// A [`KVStoreSync`] implementation that writes to and reads from a [VSS](https://github.com/lightningdevkit/vss-server/blob/main/README.md) backend.
5249
pub struct VssStore {
@@ -335,9 +332,7 @@ impl VssStoreInner {
335332
let key_obfuscator = KeyObfuscator::new(obfuscation_master_key);
336333
let storable_builder = StorableBuilder::new(data_encryption_key, RandEntropySource);
337334
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))
335+
.with_max_total_delay(VSS_IO_TIMEOUT)
341336
.skip_retry_on_error(Box::new(|e: &VssError| {
342337
matches!(
343338
e,

0 commit comments

Comments
 (0)