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 inzookeeper_pathon replicated table creation. Do not allowRENAME TABLEif it may breakzookeeper_pathafter server restart. Fixes #6917. #15348 (tavplubix).
Why it matters
To ensure replicating tables maintain consistent and valid ZooKeeper paths by dynamically resolving macros inzookeeper_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.