v.23.4New Feature

Added lost_part_count column to system.replicas table for monitoring lost parts

Added a lost_part_count column to the system.replicas table. The column value shows the total number of lost parts in the corresponding table. Value is stored in zookeeper and can be used instead of not persistent ReplicatedDataLoss profile event for monitoring. #48526 (Sergei Trifonov).
Added a lost_part_count column to the system.replicas table that shows the total number of lost parts for each replicated table.

Why it matters

This feature provides a persistent metric for monitoring data loss in replicated tables by tracking lost parts stored in Zookeeper. It replaces the previously used non-persistent ReplicatedDataLoss profile event, improving reliability and ease of monitoring.

How to use it

Users can query the new lost_part_count column in the system.replicas table directly using SELECT statements to monitor lost parts counts. For example:

SELECT database, table, replica_name, lost_part_count
FROM system.replicas
WHERE lost_part_count > 0

No additional configuration is needed as the value is maintained automatically in Zookeeper.