diff --git a/src/common/src/config.rs b/src/common/src/config.rs index 791aab1924bab..8d6bd7f34b38c 100644 --- a/src/common/src/config.rs +++ b/src/common/src/config.rs @@ -37,7 +37,7 @@ use crate::hash::VirtualNode; /// Use the maximum value for HTTP/2 connection window size to avoid deadlock among multiplexed /// streams on the same connection. -pub const MAX_CONNECTION_WINDOW_SIZE: u32 = (1 << 31) - 2; +pub const MAX_CONNECTION_WINDOW_SIZE: u32 = (1 << 31) - 1; /// Use a large value for HTTP/2 stream window size to improve the performance of remote exchange, /// as we don't rely on this for back-pressure. pub const STREAM_WINDOW_SIZE: u32 = 32 * 1024 * 1024; // 32 MB diff --git a/src/meta/node/src/server.rs b/src/meta/node/src/server.rs index a0be72e295a9a..dfa6e4fb6e8e0 100644 --- a/src/meta/node/src/server.rs +++ b/src/meta/node/src/server.rs @@ -495,7 +495,7 @@ pub async fn start_service_as_election_leader( prometheus_client, prometheus_selector, metadata_manager: metadata_manager.clone(), - compute_clients: ComputeClientPool::adhoc(), // TODO + compute_clients: ComputeClientPool::adhoc(), diagnose_command, trace_state, }; diff --git a/src/meta/src/manager/env.rs b/src/meta/src/manager/env.rs index 06a5bae3ff5cd..6d92206d0fe9c 100644 --- a/src/meta/src/manager/env.rs +++ b/src/meta/src/manager/env.rs @@ -388,7 +388,7 @@ impl MetaSrvEnv { meta_store_impl: MetaStoreImpl, ) -> MetaResult { let idle_manager = Arc::new(IdleManager::new(opts.max_idle_ms)); - let stream_client_pool = Arc::new(StreamClientPool::adhoc()); // TODO + let stream_client_pool = Arc::new(StreamClientPool::adhoc()); let event_log_manager = Arc::new(start_event_log_manager( opts.event_log_enabled, opts.event_log_channel_max_size, diff --git a/src/rpc_client/src/lib.rs b/src/rpc_client/src/lib.rs index a559e6f1526b0..bb1d90dcffbf4 100644 --- a/src/rpc_client/src/lib.rs +++ b/src/rpc_client/src/lib.rs @@ -98,12 +98,15 @@ impl std::fmt::Debug for RpcClientPool { } } +/// Intentionally not implementing `Default` to let callers be explicit about the pool size. impl !Default for RpcClientPool {} impl RpcClientPool where S: RpcClient, { + /// Create a new pool with the given `connection_pool_size`, which is the number of + /// connections to each node that will be reused. pub fn new(connection_pool_size: u16) -> Self { Self { connection_pool_size, @@ -111,10 +114,12 @@ where } } + /// Create a pool for testing purposes. Same as [`Self::adhoc`]. pub fn for_test() -> Self { Self::adhoc() } + /// Create a pool for ad-hoc usage, where the number of connections to each node is 1. pub fn adhoc() -> Self { Self::new(1) }