v.24.4Improvement

Added lightweight_deletes_sync setting for synchronous lightweight delete behavior

Added setting lightweight_deletes_sync (default value: 2 - wait all replicas synchronously). It is similar to setting mutations_sync but affects only behaviour of lightweight deletes. #62195 (Anton Popov).
lightweight_deletes_sync is a new ClickHouse setting that controls the synchronization behavior of lightweight DELETE operations across replicas.

Why it matters

This feature addresses the need to manage how lightweight delete mutations are propagated and confirmed across replicas. By enabling configurable synchronous waiting, it ensures consistency and control over the delete operation timing, improving reliability and user expectations in replicated environments.

How to use it

Users can set the lightweight_deletes_sync setting to control synchronization behavior of lightweight deletes. The default value is 2, which waits for all replicas to apply the delete synchronously. Adjust the setting value according to desired replication sync guarantees, for example:

SET lightweight_deletes_sync = 2


Apply this setting at the session or query level to enforce synchronization for lightweight delete mutations only.