v.23.4Improvement
Added replicated_max_mutations_in_one_entry setting for ReplicatedMergeTree to limit mutations per MUTATE_PART entry
Added areplicated_max_mutations_in_one_entrysetting forReplicatedMergeTreethat allows limiting the number of mutation commands per oneMUTATE_PARTentry (default is 10000). #48731 (Alexander Tokmakov).
Why it matters
This feature addresses the problem of having an excessively large number of mutation commands bundled into oneMUTATE_PART entry, which can impact performance and stability. By limiting the number of mutations per entry, it helps in managing mutation granularity, improving cluster stability and mutation processing efficiency.How to use it
Users can configure this setting by specifyingreplicated_max_mutations_in_one_entry in the ReplicatedMergeTree table engine settings. The value determines the maximum mutations allowed per MUTATE_PART entry, with the default set to 10000. For example:CREATE TABLE example (
...
) ENGINE = ReplicatedMergeTree(...)
SETTINGS replicated_max_mutations_in_one_entry = 5000;