双 AZ 中 region 的 follower 未显示的问题

【 TiDB 使用环境】测试
【 TiDB 版本】v7.6.0
【复现路径】在参考 专栏 - 同城双中心 DR Auto-Sync 主中心意外故障恢复 | TiDB 社区
部署单区域双 AZ 的 TiKV 集群时,在 placement-rules 中按 AZ1 中放 3 个 Voter,AZ2 中放 2 个 Follower 副本和 1 个 Learner 副本的方式配置之后, pd-ctl region 的输出中却看不到 Follower ,而是五个 Voter 和一个 Learner ,但是从监控看, TiKV 的 leader 和 region 都是正常的,打流时只有主 AZ 接受业务,请问这种 pd-ctl region 的输出正常吗?
【其他附件:截图/日志/监控】

发 pd-ctl 的输出


pd-ctl region 的结果是这样的,看起来有点乱,我看 Voter 和 Follower 都是参与投票的,这里是不是为了区分不同 AZ 而设置的两个角色

文本版本,方便在线转换为 json 格式:
{“count”:5,“regions”:[{“id”:2,“start_key”:“7800000100000000FB”,“end_key”:“”,“epoch”:{“conf_ver”:20,“version”:5},“peers”:[{“role_name”:“Voter”,“id”:3,“store_id”:1},{“role_name”:“Voter”,“id”:17,“store_id”:4},{“role_name”:“Voter”,“id”:27,“store_id”:7},{“role_name”:“Voter”,“id”:38,“store_id”:8},{“role_name”:“Voter”,“id”:42,“store_id”:6},{“role_name”:“Learner”,“is_learner”:true,“id”:47,“store_id”:5,“role”:1}],“leader”:{“role_name”:“Voter”,“id”:17,“store_id”:4},“cpu_usage”:0,“written_bytes”:0,“read_bytes”:0,“written_keys”:0,“read_keys”:0,“approximate_size”:1,“approximate_keys”:0,“replication_status”:{“state”:“SIMPLE_MAJORITY”,“state_id”:5001}},{“id”:9,“start_key”:“”,“end_key”:“7200000000000000FB”,“epoch”:{“conf_ver”:14,“version”:5},“peers”:[{“role_name”:“Voter”,“id”:10,“store_id”:1},{“role_name”:“Voter”,“id”:18,“store_id”:4},{“role_name”:“Voter”,“id”:22,“store_id”:5},{“role_name”:“Learner”,“is_learner”:true,“id”:34,“store_id”:7,“role”:1},{“role_name”:“Voter”,“id”:39,“store_id”:8},{“role_name”:“Voter”,“id”:44,“store_id”:6}],“leader”:{“role_name”:“Voter”,“id”:10,“store_id”:1},“cpu_usage”:0,“written_bytes”:0,“read_bytes”:0,“written_keys”:0,“read_keys”:0,“approximate_size”:1,“approximate_keys”:0,“replication_status”:{“state”:“SIMPLE_MAJORITY”,“state_id”:5001}},{“id”:11,“start_key”:“7200000000000000FB”,“end_key”:“7200000100000000FB”,“epoch”:{“conf_ver”:26,“version”:5},“peers”:[{“role_name”:“Voter”,“id”:19,“store_id”:4},{“role_name”:“Voter”,“id”:29,“store_id”:8},{“role_name”:“Voter”,“id”:33,“store_id”:6},{“role_name”:“Voter”,“id”:35,“store_id”:7},{“role_name”:“Learner”,“is_learner”:true,“id”:43,“store_id”:5,“role”:1},{“role_name”:“Voter”,“id”:48,“store_id”:1}],“leader”:{“role_name”:“Voter”,“id”:19,“store_id”:4},“cpu_usage”:0,“written_bytes”:0,“read_bytes”:0,“written_keys”:0,“read_keys”:0,“approximate_size”:1,“approximate_keys”:0,“replication_status”:{“state”:“SIMPLE_MAJORITY”,“state_id”:5001}},{“id”:13,“start_key”:“7200000100000000FB”,“end_key”:“7800000000000000FB”,“epoch”:{“conf_ver”:26,“version”:5},“peers”:[{“role_name”:“Learner”,“is_learner”:true,“id”:24,“store_id”:5,“role”:1},{“role_name”:“Voter”,“id”:30,“store_id”:8},{“role_name”:“Voter”,“id”:32,“store_id”:6},{“role_name”:“Voter”,“id”:36,“store_id”:7},{“role_name”:“Voter”,“id”:40,“store_id”:4},{“role_name”:“Voter”,“id”:45,“store_id”:1}],“leader”:{“role_name”:“Voter”,“id”:40,“store_id”:4},“cpu_usage”:0,“written_bytes”:0,“read_bytes”:0,“written_keys”:0,“read_keys”:0,“approximate_size”:1,“approximate_keys”:0,“replication_status”:{“state”:“SIMPLE_MAJORITY”,“state_id”:5001}},{“id”:15,“start_key”:“7800000000000000FB”,“end_key”:“7800000100000000FB”,“epoch”:{“conf_ver”:26,“version”:5},“peers”:[{“role_name”:“Voter”,“id”:16,“store_id”:1},{“role_name”:“Voter”,“id”:28,“store_id”:6},{“role_name”:“Learner”,“is_learner”:true,“id”:31,“store_id”:5,“role”:1},{“role_name”:“Voter”,“id”:37,“store_id”:7},{“role_name”:“Voter”,“id”:41,“store_id”:8},{“role_name”:“Voter”,“id”:46,“store_id”:4}],“leader”:{“role_name”:“Voter”,“id”:46,“store_id”:4},“cpu_usage”:0,“written_bytes”:0,“read_bytes”:0,“written_keys”:0,“read_keys”:0,“approximate_size”:1,“approximate_keys”:0,“replication_status”:{“state”:“SIMPLE_MAJORITY”,“state_id”:5001}}]}

你用 jq 格式化一下这个,这个显示是没有问题的,有一个 leader 元素单独显示 leader,非 leader 的 voter 就都是 follower

多谢解答

“state”:“SIMPLE_MAJORITY” 这个代表 region 同步策略没转化成功
正常 DR auto sync 状态下应该是 INTEGRITY_OVER_LABEL。

此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。