【TiDB 版本】6.5.0
执行 policy 语句创建单副本 policy 时会报错,follower 数量必须大于零;但可以创建 followers = 1 的规则,然后在绑定到表上之后用 pd-ctl 修改规则产生的 placement rule,设置 count = 1。请问是否有其它更便捷的办法?以及修改 policy 生成的 rule 是否安全?
create placement policy replica_1 followers = 0
> [42000][1064] You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 49 near ";"FOLLOWERS must be positive
下面是修改后的 rule,show table region 查询规则正常生效
{
"group_id": "TiDB_DDL_83957",
"id": "table_rule_83957_0",
"index": 40,
"start_key": "7480000000000147fff500000000000000f8",
"end_key": "7480000000000147fff600000000000000f8",
"role": "voter",
"is_witness": false,
"count": 1,
"label_constraints": [
{
"key": "engine",
"op": "notIn",
"values": [
"tiflash"
]
}
],
"version": 1,
"create_timestamp": 1757468298
}