v.23.4Improvement

Added replicated_max_mutations_in_one_entry setting for ReplicatedMergeTree to limit mutations per MUTATE_PART entry

Added a replicated_max_mutations_in_one_entry setting for ReplicatedMergeTree that allows limiting the number of mutation commands per one MUTATE_PART entry (default is 10000). #48731 (Alexander Tokmakov).
Added a replicated_max_mutations_in_one_entry setting for ReplicatedMergeTree to limit the number of mutation commands included in a single MUTATE_PART entry, with a default value of 10000.

Why it matters

This feature addresses the problem of having an excessively large number of mutation commands bundled into one MUTATE_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 specifying replicated_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;