v.23.3Improvement
Added STRICT Modifier for SYSTEM SYNC REPLICA to Wait for Replication Queue
Added an optionalSTRICTmodifier forSYSTEM SYNC REPLICAwhich makes the query wait for the replication queue to become empty (just like it worked before https://github.com/ClickHouse/ClickHouse/pull/45648). #47659 (Alexander Tokmakov).
Why it matters
This feature restores the original behavior ofSYSTEM SYNC REPLICA prior to the changes introduced in PR #45648. It ensures that users can force synchronization that waits for all replication tasks to finish, providing stronger consistency guarantees and better control over replication status.How to use it
Use theSTRICT modifier with the SYSTEM SYNC REPLICA command as follows:SYSTEM SYNC REPLICA table_name STRICTThis will block the query until the replication queue is fully empty for the specified replica.