v.20.10Improvement

Unfold macros in zookeeper_path during replicated table creation and restrict RENAME TABLE to prevent path breakage

Unfold {database}, {table} and {uuid} macros in zookeeper_path on replicated table creation. Do not allow RENAME TABLE if it may break zookeeper_path after server restart. Fixes #6917. #15348 (tavplubix).
Unfold {database}, {table}, and {uuid} macros in zookeeper_path during replicated table creation and prevent RENAME TABLE operations that could invalidate zookeeper_path after server restart.

Why it matters

To ensure replicating tables maintain consistent and valid ZooKeeper paths by dynamically resolving macros in zookeeper_path on creation. Additionally, it prevents RENAME TABLE commands that would break the association with ZooKeeper after a server restart, avoiding replication inconsistencies and operational issues.

How to use it

Use {database}, {table}, and {uuid} macros inside the zookeeper_path setting when creating replicated tables. The system will automatically unfold these macros. Note that RENAME TABLE operations that would disrupt the resolved zookeeper_path are disallowed to maintain replication integrity.