From 344fe3a90121c214c3fd83ca44ddce56c15bce42 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Wed, 24 Apr 2024 15:11:22 +0100 Subject: [PATCH] node: increase `FETCH_TIMEOUT` After empirically testing HardenedBSD[[0]], which has a total blob size of 42GiB, and its largest checkout is 1.26GiB (using `git-sizer`[[1]]), it was found that letting the background process fetch the repository with a timeout of 1 hour is enough (a very generous estimate). This deemed sufficient, since cases smaller than this will report back that they are done before this time. For cases larger than this, more research will be needed. [0]: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD [1]: https://github.com/github/git-sizer Signed-off-by: Fintan Halpenny X-Clacks-Overhead: GNU Terry Pratchett --- radicle-node/src/service.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicle-node/src/service.rs b/radicle-node/src/service.rs index 5ca26b25..9f2109c2 100644 --- a/radicle-node/src/service.rs +++ b/radicle-node/src/service.rs @@ -97,8 +97,8 @@ pub const MIN_RECONNECTION_DELTA: LocalDuration = LocalDuration::from_secs(3); pub const MAX_RECONNECTION_DELTA: LocalDuration = LocalDuration::from_mins(60); /// Connection retry delta used for ephemeral peers that failed to connect previously. pub const CONNECTION_RETRY_DELTA: LocalDuration = LocalDuration::from_mins(10); -/// How long to wait for a fetch to stall before aborting. -pub const FETCH_TIMEOUT: time::Duration = time::Duration::from_secs(9); +/// How long to wait for a fetch to stall before aborting, default is 1 hour. +pub const FETCH_TIMEOUT: time::Duration = time::Duration::from_secs(3600); /// Maximum external address limit imposed by message size limits. pub use message::ADDRESS_LIMIT;