v.21.8Improvement

Better Handling of Lost Parts in ReplicatedMergeTree Tables

Better handling of lost parts for ReplicatedMergeTree tables. Fixes rare inconsistencies in ReplicationQueue. Fixes #10368. #25820 (alesapin).
Improved handling of lost parts in ReplicatedMergeTree tables to fix rare inconsistencies in the ReplicationQueue.

Why it matters

This feature addresses sporadic issues where parts are lost during replication, causing inconsistencies in the ReplicationQueue. By better managing lost parts, it ensures more reliable and consistent replication state tracking for ReplicatedMergeTree tables, enhancing data integrity and cluster stability.

How to use it

The improvements are applied internally to ReplicatedMergeTree tables. Users benefit automatically after upgrading ClickHouse to the version containing this fix. No additional configuration or manual action is required.