Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions nativelink-config/src/stores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,10 +1156,16 @@ pub struct GrpcSpec {
pub connections_per_endpoint: usize,

/// Maximum time (seconds) allowed for a single RPC request (e.g. a
/// ByteStream.Write call) before it is cancelled. This prevents
/// individual RPCs from hanging forever on dead connections.
/// ByteStream.Write call) before it is cancelled.
///
/// Default: 120 (seconds)
/// A value of 0 (the default) disables the per-RPC timeout. Dead
/// connections are still detected by the HTTP/2 and TCP keepalive
/// mechanisms configured on each endpoint.
///
/// For large uploads (multi-GB), either leave this at 0 or set it
/// large enough to accommodate the full transfer time.
///
/// Default: 0 (disabled)
#[serde(default, deserialize_with = "convert_duration_with_shellexpand")]
pub rpc_timeout_s: u64,
}
Expand Down
6 changes: 1 addition & 5 deletions nativelink-store/src/grpc_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ impl GrpcStore {
endpoints.push(endpoint);
}

let rpc_timeout = if spec.rpc_timeout_s > 0 {
Duration::from_secs(spec.rpc_timeout_s)
} else {
Duration::from_secs(120)
};
let rpc_timeout = Duration::from_secs(spec.rpc_timeout_s);

Ok(Arc::new(Self {
instance_name: spec.instance_name.clone(),
Expand Down
Loading