Description
Bug Report
When PD schedules a partition to tiflash, TiFlash will validate the keyrange if there is a _r
suffix.
But placement rules are not compatible with the old set tiflash replica
syntax too, so we should forbid using +engine=tiflash, and should add -engine=tiflash to every rule to avoid schedules to tiflash instance.
1. Minimal reproduce step (Required)
-
tiup playground
with at lease 3 tikv instances. -
add a random placement rule with the label
+engine=tiflash
. E.galter table t alter partition p0 add placement policy role=follower replicas=1 constraints='["+engine=tiflash"]'
. -
tiup playground
with at lease 3 tikv instances. -
alter table t set tiflash replica 3
-
alter table t alter partition p0 add placement policy role=follower replicas=1 constraints='["+engine=tiflash"]'
.
2. What did you expect to see? (Required)
The first example should work fine. In the 2nd example, 3 should fail.
3. What did you see instead (Required)
TiFlash crashed.
4. What is your TiDB version? (Required)
Newest nightly.