v.25.4Improvement

Attaching parts of MergeTree tables will be

Attaching parts of MergeTree tables will be performed in their block order, which is important for special merging algorithms, such as ReplacingMergeTree. This closes #71009. #77976 (Alexey Milovidov).
Attaching parts of MergeTree tables is now performed in their block order, ensuring correct processing for special merging algorithms like ReplacingMergeTree.

Why it matters

The feature addresses the issue of improper ordering when attaching parts to MergeTree tables, which can lead to incorrect data states in tables using specialized merge algorithms. By preserving block order during attachment, it guarantees data consistency and correctness for features like ReplacingMergeTree.

How to use it

This improvement is applied automatically in ClickHouse when attaching parts to MergeTree tables. Users do not need to make any changes to benefit from this feature.