v.21.7Improvement

Improved Distributed Tables: Increased Replica Support for Internal Replication

Improvement for Distributed tables. Drop replicas from dirname for internal_replication=true (allows INSERT into Distributed with cluster from any number of replicas, before only 15 replicas was supported, everything more will fail with ENAMETOOLONG while creating directory for async blocks). #25513 (Azat Khuzhin).
Improved handling of replica directories for Distributed tables with internal_replication=true, removing replica names from directory paths to prevent path length errors.

Why it matters

This feature resolves the issue where Distributed tables with asynchronous replication supported only up to 15 replicas due to directory path length limits (ENAMETOOLONG error). By dropping replica names from the directory structure, it now allows INSERT operations with any number of replicas in the cluster, improving scalability and stability.

How to use it

To benefit from this improvement, use Distributed tables with the setting internal_replication=true. No additional user action is required beyond enabling internal replication on Distributed tables.