v.21.7Improvement
Respect max_distributed_connections in insert_distributed_sync to avoid max_thread_pool_size issues
Respectmax_distributed_connectionsforinsert_distributed_sync(otherwise for huge clusters and sync insert it may run out ofmax_thread_pool_size). #24754 (Azat Khuzhin).
Why it matters
This feature addresses the issue where synchronous inserts into distributed tables could spawn too many connections, potentially exceeding themax_thread_pool_size limit and causing resource exhaustion. By respecting the max_distributed_connections limit, it improves stability and resource management for large-scale ClickHouse deployments.How to use it
To apply this feature, ensure thatinsert_distributed_sync is enabled and configure the max_distributed_connections setting appropriately to limit the number of concurrent connections during synchronous distributed inserts. No additional action is required as the feature is integrated into the system behavior.