v.21.6Improvement

User Misconfiguring max_distributed_connections to Zero Triggers Incorrect Exception Message

If user applied a misconfiguration by mistakenly setting max_distributed_connections to value zero, every query to a Distributed table will throw exception with a message containing "logical error". But it's really an expected behaviour, not a logical error, so the exception message was slightly incorrect. It also triggered checks in our CI enviroment that ensures that no logical errors ever happen. Instead we will treat max_distributed_connections misconfigured to zero as the minimum possible value (one). #23348 (Azat Khuzhin).
Improved handling of misconfiguration for max_distributed_connections when set to zero, avoiding misleading exceptions for Distributed table queries.

Why it matters

Previously, setting max_distributed_connections to zero caused queries on Distributed tables to throw exceptions labeled as "logical error," which was misleading since this scenario is expected. This caused confusion and false positive checks in CI environments that monitor logical errors. The feature treats zero as the minimum valid setting (one), preventing unnecessary exceptions and improving stability.

How to use it

No explicit user action is required. When max_distributed_connections is set to zero, the system automatically treats it as one, ensuring queries to Distributed tables function correctly without exceptions related to this misconfiguration.