【 TiDB 使用环境】
【概述】场景+问题概述
【背景】做过哪些操作
【现象】 执行ALTER TABLE table_name SET TIFLASH REPLICA 1;后 progress 一直为0
【业务影响】
【TiDB 版本】 4.0.8
【附件】
tiflash_error.log (5.5 MB) 1.txt (11.9 KB)
-
TiUP Cluster Display 信息
-
TiUP Cluster Edit Config 信息
-
TiDB- Overview 监控
大表小表都是这样,最小的20条记录,也一直是0
log只是其中的一台
所有表,tiflash已经跑了有一段时间了,之前没有这个问题
ALTER TABLE table_name SET TIFLASH REPLICA 4;然后再把日志抓一下
这是5个节点的日志:
2021.09.15 15:05:06.390384 [ 23 ] pingcap.tikv: region {3429817,1101,38} find error: peer is not leader for region 3429817, leader may Some(id: 3429821 store_id: 5)
2021.09.15 15:05:07.941415 [ 25 ] pingcap.tikv: region {3429817,1101,38} find error: peer is not leader for region 3429817, leader may Some(id: 3429821 store_id: 5)
2021.09.15 15:05:01.649562 [ 25 ] pingcap.tikv: region {3429817,1101,38} find error: peer is not leader for region 3429817, leader may Some(id: 3429821 store_id: 5)
2021.09.15 15:04:58.828139 [ 21 ] pingcap.tikv: region {3429817,1101,38} find error: peer is not leader for region 3429817, leader may Some(id: 3429821 store_id: 5)
2021.09.15 15:05:05.971086 [ 35 ] pingcap.tikv: region {3429817,1101,38} find error: peer is not leader for region 3429817, leader may Some(id: 3429821 store_id: 5)
replication.max-replicas 这个参数是多少
region状态是这么看吗?这个表的region id 好像不是3429817
“max-replicas”: 3
replication.enable-placement-rules
是否启动了?
启动了
» config show replication
{
“max-replicas”: 3,
“location-labels”: “zone,rack,host”,
“strictly-match-label”: “false”,
“enable-placement-rules”: “true”
}
通过 pd-ctl -u http://<pd-ip>:<pd-port> config placement-rules show
确认 group: default 中 count 参数值。
{
“group_id”: “pd”,
“id”: “default”,
“start_key”: “”,
“end_key”: “”,
“role”: “voter”,
“count”: 5
},