我是否必须监控 ClickHouse 副本领导者状态?

Do I have to monitor ClickHouse replica leader state?

根据 ClickHouse 官方 docs 的说法,如果我的副本出现问题,可以通知我监控请求。

SELECT
    database,
    table,
    is_leader,
    is_readonly,
    is_session_expired,
    future_parts,
    parts_to_check,
    columns_version,
    queue_size,
    inserts_in_queue,
    merges_in_queue,
    log_max_index,
    log_pointer,
    total_replicas,
    active_replicas
FROM system.replicas
WHERE
       is_readonly
    OR is_session_expired
    OR future_parts > 20
    OR parts_to_check > 10
    OR queue_size > 20
    OR inserts_in_queue > 10
    OR log_max_index - log_pointer > 10
    OR total_replicas < 2
    OR active_replicas < total_replicas

我是否额外监控了我的副本的领导者状态?如果领导者宕机并且没有一个节点可以代替领导者(can_become_leader: 0),副本会发生什么?

What happens with replica if leader get down and there's no one node which could be leader instead (can_become_leader: 0)?

合并和突变将停止。您将收到“零件太多”错误。