v.20.11Improvement

Fix query hang due to misconfiguration of connections_with_failover_max_tries set to 0

Fix query hang (endless loop) in case of misconfiguration (connections_with_failover_max_tries set to 0). #15876 (Azat Khuzhin).
Fixes a query hang caused by an endless loop when the configuration parameter connections_with_failover_max_tries is set to 0.

Why it matters

This fix addresses a bug where setting connections_with_failover_max_tries to 0 would cause queries to hang indefinitely due to an endless retry loop. It improves stability by preventing such misconfiguration from causing query deadlocks.

How to use it

Ensure that the parameter connections_with_failover_max_tries is set to a positive integer to avoid the infinite retry loop. Apply the update containing this fix to prevent query hanging even if the parameter is misconfigured.