blockfetcher: decrease default pool deal timeout

Dealing is fast, we don't need 10 minutes to check that connection can
(or can't) be established. Improve documentation along the way.

Close #3721.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-12-04 16:28:26 +03:00
parent 0879018e03
commit 2244d2ad75

View file

@ -39,11 +39,17 @@ const (
defaultDownloaderWorkersCount = 100 defaultDownloaderWorkersCount = 100
) )
// Constants related to NeoFS pool request timeouts. Such big values are used to avoid // Constants related to NeoFS pool request timeouts.
// NeoFS pool timeouts during block search and download.
const ( const (
defaultDialTimeout = 10 * time.Minute // defaultDialTimeout is a default timeout used to establish connection with
defaultStreamTimeout = 10 * time.Minute // NeoFS storage nodes.
defaultDialTimeout = 30 * time.Second
// defaultStreamTimeout is a default timeout used for NeoFS streams processing.
// It has significantly large value to reliably avoid timeout problems with heavy
// SEARCH requests.
defaultStreamTimeout = 10 * time.Minute
// defaultHealthcheckTimeout is a timeout for request to NeoFS storage node to
// decide if it is alive.
defaultHealthcheckTimeout = 10 * time.Second defaultHealthcheckTimeout = 10 * time.Second
) )