一、支持版本
适用于 TDSQL Boundless V21.2.7.0 及以上版本。
二、字段说明
| 字段名 | 类型 | 描述 |
| rep_group_id | bigint unsigned | RG ID。 |
| member_role | varchar(64) | 副本角色,支持 MEMBER_ROLE_FOLLOWER、MEMBER_ROLE_LEADER、MEMBER_ROLE_LEARNER。 |
| rep_group_state | varchar(64) | RG 状态。 |
| meta_version | bigint | 元信息版本号。 |
| member_version | bigint | 成员变更版本号。 |
| key_range_version | bigint | Key 区间版本号。 |
| quorum | int unsigned | 法定 Quorum。 |
| node_name | varchar(320) | 所在的节点名。 |
| tdstore_ip_port | varchar(64) | 所在 TDStore 节点地址。 |
| last_report_time | varchar(64) | 最后心跳上报的时间。 |
| last_working_time | varchar(64) | 副本为工作状态(WORKING、SPLIT、MERGE)的最后时间。 |
| rep_group_stats_approximate_size | bigint unsigned | 副本的近似数据量大小,单位为 bytes。 |
| rep_group_stats_approximate_keys | bigint unsigned | 副本中 key 的近似数量。 |
| rep_group_log_info_current_term | bigint unsigned | 当前 Leader 任期。 |
| rep_group_log_info_committed_index | bigint unsigned | 已提交的日志号。 |
| rep_group_log_info_consecutive_applied_index | bigint unsigned | 已应用的日志号。 |
| rep_group_log_info_last_snapshot_index | bigint unsigned | 最后一次做快照的位点日志号。 |
| rep_group_log_info_first_index | bigint unsigned | 内存中保留的 Raft Log 首位日志号,表示之前的日志都被 Purge 了。 |
| rep_group_log_info_last_index | bigint unsigned | 内存中保留的 Raft Log 末位日志号。 |
| rep_group_log_info_disk_index | bigint unsigned | 已落盘的 Raft Log 日志号。 |
| rep_group_log_info_applied_index | bigint unsigned | 已应用的 Raft Log 日志号。 |
| rep_group_log_info_backuped_index | bigint unsigned | 已备份至远端存储的最新日志号(以 Leader 副本为准)。 |
| rep_group_log_info_raft_log_sync_delay_seconds | bigint unsigned | 副本日志同步延迟。 |
三、示例
tdsql>SELECT * FROM information_schema.META_CLUSTER_REPLICAS LIMIT 1 \\G*************************** 1. row *************************** rep_group_id: 1792 member_role: MEMBER_ROLE_FOLLOWER rep_group_state: RG_STATE_F_WORKING meta_version: 36 member_version: 0 key_range_version: 36 quorum: 3 node_name: node-tdsql3-******-001 tdstore_ip_port: 10.10.10.10:6005 last_report_time: 2024-08-19 17:30:01.444681 last_working_time: 2024-08-19 17:30:01.444681 rep_group_stats_approximate_size: 9720817 rep_group_stats_approximate_keys: 3825 rep_group_log_info_current_term: 9 rep_group_log_info_committed_index: 8011 rep_group_log_info_consecutive_applied_index: 8011 rep_group_log_info_last_snapshot_index: 7997 rep_group_log_info_first_index: 2 rep_group_log_info_last_index: 8011 rep_group_log_info_disk_index: 8011 rep_group_log_info_applied_index: 8011 rep_group_log_info_backuped_index: 0rep_group_log_info_raft_log_sync_delay_seconds: 01 row in set (0.01 sec)