TDSQL_RAFT_LEADER_SWITCH_RES

最近更新时间:2025-11-18 10:10:23

我的收藏

功能

TDStore 和 MC 的 Raft 层 Leader 角色切换记录。

字段说明

字段名
类型
描述
ID
int
自增 ID。
module
ENUM("MC", "TDSTORE")
模块,目前提供 MC、 TDStore 的切主信息。
idx
bigint unsigned
raft 节点标识。
switch_begin_time
bigint
切换开始时间(毫秒级时间戳)。
switch_end_time
bigint
切换结束时间(毫秒级时间戳)。
switch_used_time
bigint
切换耗时。
switch_reason
varchar(512)
切换原因。
switch_type
int
切换类型。
switch_status
int
切换状态。
src_host
VARCHAR(128)
原 Leader 节点地址。
dst_host
VARCHAR(128)
新 Leader 节点地址。
is_success
int
是否成功。
failure_reason
varchar(128)
失败原因。

示例

tdsql3_sys_local@localhost [sys]> select * from tdsql_raft_leader_switch_res;
+-----+---------+-------+-------------------+-----------------+------------------+---------------+-------------+---------------+----------------------+----------------------+------------+----------------+
| ID | module | idx | switch_begin_time | switch_end_time | switch_used_time | switch_reason | switch_type | switch_status | src_host | dst_host | is_success | failure_reason |
+-----+---------+-------+-------------------+-----------------+------------------+---------------+-------------+---------------+----------------------+----------------------+------------+----------------+
| 202 | TDSTORE | 72757 | 1733195593005 | 1733195593022 | 17 | | 0 | 0 | | node-******-1-001 | 1 | |
| 203 | MC | 0 | 1733280390626 | 1733280388221 | -2405 | | 0 | 0 | mc-******-1-1 | mc-******-1-2 | 0 | NULL |
| 401 | TDSTORE | 72757 | 1733195895171 | 1733195895181 | 10 | | 1 | 0 | node-******-1-001 | node-******-1-002 | 1 | |
+-----+---------+-------+-------------------+-----------------+------------------+---------------+-------------+---------------+----------------------+----------------------+------------+----------------+
3 rows in set (0.00 sec)