File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1156,10 +1156,16 @@ pub struct GrpcSpec {
11561156 pub connections_per_endpoint : usize ,
11571157
11581158 /// Maximum time (seconds) allowed for a single RPC request (e.g. a
1159- /// ByteStream.Write call) before it is cancelled. This prevents
1160- /// individual RPCs from hanging forever on dead connections.
1159+ /// ByteStream.Write call) before it is cancelled.
11611160 ///
1162- /// Default: 120 (seconds)
1161+ /// A value of 0 (the default) disables the per-RPC timeout. Dead
1162+ /// connections are still detected by the HTTP/2 and TCP keepalive
1163+ /// mechanisms configured on each endpoint.
1164+ ///
1165+ /// For large uploads (multi-GB), either leave this at 0 or set it
1166+ /// large enough to accommodate the full transfer time.
1167+ ///
1168+ /// Default: 0 (disabled)
11631169 #[ serde( default , deserialize_with = "convert_duration_with_shellexpand" ) ]
11641170 pub rpc_timeout_s : u64 ,
11651171}
Original file line number Diff line number Diff line change @@ -90,11 +90,7 @@ impl GrpcStore {
9090 endpoints. push ( endpoint) ;
9191 }
9292
93- let rpc_timeout = if spec. rpc_timeout_s > 0 {
94- Duration :: from_secs ( spec. rpc_timeout_s )
95- } else {
96- Duration :: from_secs ( 120 )
97- } ;
93+ let rpc_timeout = Duration :: from_secs ( spec. rpc_timeout_s ) ;
9894
9995 Ok ( Arc :: new ( Self {
10096 instance_name : spec. instance_name . clone ( ) ,
You can’t perform that action at this time.
0 commit comments