Skip to content
Closed
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
21 changes: 19 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,13 @@ pub struct HttpConfig {
/// Maximum total time across retries for a single logical RPC.
pub overall_timeout: Duration,

/// Connection pool size.
/// Connection pool size (max idle warm sockets per remote host).
///
/// Defaults to `100`, matching the JDBC driver's `HttpConnectionPoolSize`
/// default. Raise this for workloads that burst many concurrent
/// `executeStatement` calls or CloudFetch chunk downloads against a
/// single host; too low a value forces fresh TLS handshakes when the
/// pool fills.
pub pool_max_idle_per_host: usize,
}

Expand All @@ -330,7 +336,7 @@ impl Default for HttpConfig {
Self {
request_timeout: Duration::from_secs(120),
overall_timeout: Duration::from_secs(900),
pool_max_idle_per_host: 10,
pool_max_idle_per_host: 100,
}
}
}
Expand Down Expand Up @@ -640,4 +646,15 @@ mod tests {
assert!(s.contains("<redacted>"));
assert!(s.contains("databricks"));
}

// ─── HttpConfig defaults ───────────────────────────────────────

#[test]
fn http_config_default_pool_max_idle_per_host_is_100() {
// Matches the JDBC driver's `HttpConnectionPoolSize` default and
// narrows the throughput gap with thrift's `maxSockets: Infinity`
// for high-concurrency workloads. See
// `sea-workflow/specs/07-errors-retries/connection-pool-default-mismatch.md`.
assert_eq!(HttpConfig::default().pool_max_idle_per_host, 100);
}
}