File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
aggregation_mode/src/backend Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,19 @@ const RETRY_MAX_TIMES: usize = 5;
2626/// Maximum delay between retry attempts (in seconds)
2727const RETRY_MAX_DELAY_SECONDS : u64 = 10 ;
2828
29- /// Timeout for Reqwest Client
30- const REQWEST_TIMEOUT_SECONDS : Duration = Duration :: from_secs ( 60 ) ;
29+ /// Timeout for establishing a connection to S3
30+ const CONNECT_TIMEOUT_SECONDS : Duration = Duration :: from_secs ( 10 ) ;
31+ /// Timeout for Batch Download Requests
32+ const BATCH_DOWNLOAD_TIMEOUT_SECONDS : Duration = Duration :: from_secs ( 5 * 60 ) ;
3133
3234async fn get_aligned_batch_from_s3_retryable (
3335 url : String ,
3436) -> Result < Vec < VerificationData > , RetryError < GetBatchProofsError > > {
3537 info ! ( "Fetching batch from S3 URL: {}" , url) ;
3638 let client = reqwest:: Client :: builder ( )
3739 . user_agent ( DEFAULT_USER_AGENT )
38- . timeout ( REQWEST_TIMEOUT_SECONDS )
40+ . connect_timeout ( CONNECT_TIMEOUT_SECONDS )
41+ . timeout ( BATCH_DOWNLOAD_TIMEOUT_SECONDS )
3942 . build ( )
4043 . map_err ( |e| RetryError :: Permanent ( GetBatchProofsError :: ReqwestClientFailed ( e. to_string ( ) ) ) ) ?;
4144
You can’t perform that action at this time.
0 commit comments