aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Storages/MergeTree/ReplicatedTableStatus.h
blob: ce9ad3640f414963e90ee7ec8aacee7b6c071dbb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once

#include <Storages/MergeTree/ReplicatedMergeTreeQueue.h>
#include <Core/Types.h>

namespace DB
{

/** For the system table replicas. */
struct ReplicatedTableStatus
{
    bool is_leader;
    bool can_become_leader;
    bool is_readonly;
    bool is_session_expired;

    ReplicatedMergeTreeQueue::Status queue;
    UInt32 parts_to_check;
    String zookeeper_name;
    String zookeeper_path;
    String replica_name;
    String replica_path;
    Int32 columns_version;
    UInt64 log_max_index;
    UInt64 log_pointer;
    UInt64 absolute_delay;
    UInt8 total_replicas;
    UInt8 active_replicas;
    UInt64 lost_part_count;
    String last_queue_update_exception;
    /// If the error has happened fetching the info from ZooKeeper, this field will be set.
    String zookeeper_exception;

    std::unordered_map<std::string, bool> replica_is_active;
};

}