v.23.4New Feature

Added LIGHTWEIGHT and PULL Modifiers for SYSTEM SYNC REPLICA Query

Added LIGHTWEIGHT and PULL modifiers for SYSTEM SYNC REPLICA query. LIGHTWEIGHT version waits for fetches and drop-ranges only (merges and mutations are ignored). PULL version pulls new entries from ZooKeeper and does not wait for them. Fixes #47794. #48085 (Alexander Tokmakov).
Added LIGHTWEIGHT and PULL modifiers for the SYSTEM SYNC REPLICA query in ClickHouse.

Why it matters

These modifiers enable more granular control over the synchronization process of replicas. The LIGHTWEIGHT modifier waits only for fetches and drop-ranges, ignoring merges and mutations, which reduces waiting time during sync. The PULL modifier pulls new entries from ZooKeeper without waiting for them, allowing faster replica synchronization. This addresses efficiency and performance concerns in replica syncing workflows.

How to use it

To use these features, append the LIGHTWEIGHT or PULL modifier to the SYSTEM SYNC REPLICA query. For example:

SYSTEM SYNC REPLICA [db.]table [LIGHTWEIGHT]
SYSTEM SYNC REPLICA [db.]table PULL