From 9c745582c4719f25b7dff07d2f5bab10220c6e9a Mon Sep 17 00:00:00 2001 From: Shamil Gadelshin Date: Thu, 1 Feb 2024 15:57:13 +0700 Subject: [PATCH] Increase retries number for DSN requests. --- crates/subspace-farmer/src/single_disk_farm/plotting.rs | 2 +- crates/subspace-service/src/sync_from_dsn/import_blocks.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/subspace-farmer/src/single_disk_farm/plotting.rs b/crates/subspace-farmer/src/single_disk_farm/plotting.rs index 7a4872a4ee..a17787063f 100644 --- a/crates/subspace-farmer/src/single_disk_farm/plotting.rs +++ b/crates/subspace-farmer/src/single_disk_farm/plotting.rs @@ -43,7 +43,7 @@ const FARMER_APP_INFO_RETRY_INTERVAL: Duration = Duration::from_millis(500); /// Size of the cache of archived segments for the purposes of faster sector expiration checks. const ARCHIVED_SEGMENTS_CACHE_SIZE: NonZeroUsize = NonZeroUsize::new(1000).expect("Not zero; qed"); /// Get piece retry attempts number. -const PIECE_GETTER_RETRY_NUMBER: NonZeroU16 = NonZeroU16::new(4).expect("Not zero; qed"); +const PIECE_GETTER_RETRY_NUMBER: NonZeroU16 = NonZeroU16::new(7).expect("Not zero; qed"); /// Details about sector currently being plotted #[derive(Debug, Clone, Encode, Decode)] diff --git a/crates/subspace-service/src/sync_from_dsn/import_blocks.rs b/crates/subspace-service/src/sync_from_dsn/import_blocks.rs index a3b271250e..178e8981b9 100644 --- a/crates/subspace-service/src/sync_from_dsn/import_blocks.rs +++ b/crates/subspace-service/src/sync_from_dsn/import_blocks.rs @@ -37,7 +37,7 @@ use tokio::sync::Semaphore; use tracing::warn; /// Get piece retry attempts number. -const PIECE_GETTER_RETRY_NUMBER: NonZeroU16 = NonZeroU16::new(4).expect("Not zero; qed"); +const PIECE_GETTER_RETRY_NUMBER: NonZeroU16 = NonZeroU16::new(7).expect("Not zero; qed"); /// How many blocks to queue before pausing and waiting for blocks to be imported, this is /// essentially used to ensure we use a bounded amount of RAM during sync process.