ddl: fix placement rules compatibility with tiflash#22065
ddl: fix placement rules compatibility with tiflash#22065ti-srebot merged 11 commits intopingcap:masterfrom
Conversation
djshow832
left a comment
There was a problem hiding this comment.
Add some cases to placement_sql_test.go to test if the placement rules generated by SQL are right in these scenarios:
- Whether the placement rules all contain "-engine=tiflash".
- When the user also defines "-engine=tiflash", the placement rules should only contain one "-engine=tiflash" constraint.
CONSTRAINTS='{"+zone=bj":1}' REPLICAS=2, the extra count should also contain "-engine=tiflash" constraint. (Maybe?)
@djshow832 I can not add tests in Or maybe manual test in |
wjhuang2016
left a comment
There was a problem hiding this comment.
Please create an issue for this problem.
wjhuang2016
left a comment
There was a problem hiding this comment.
The first commit fixed that. It is not convenient for a reviewer to find your first commit.
You can write: "Using GenTableRecordPrefix instead of GenTablePrefix can fix this problem."
Besides, is there any test for this change?
|
@wjhuang2016 I will try if |
You can do a manual test. Start a cluster to test it. |
A manual test is already done, of course. |
TiFlash will compare the the record prefix too. Signed-off-by: xhe <xw897002528@gmail.com>
Though the previous commit fixed the compatibility between tiflash and placement rules. But it is still not caompatible with the old `set tiflash replica` syntax. Thus this commit banned the usage and avoid using tiflash by appending a hidden label to filter tiflash instance. Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
|
/merge |
|
/run-all-tests |
What problem does this PR solve?
Issue: close #22171
Problem Summary: When PD scheduels a partition to tiflash, TiFlash will validate the keyrange if there is a
_rsuffix. Using GenTableRecordPrefix instead of GenTablePrefix can fix this problem.But placement rules are not compatible with the old
set tiflash replicasyntax, so the second commit simply forbids using+engine=tiflash, and will add-engine=tiflashto every rule to avoid scheduels to tiflash instance. Maybe that will be reverted in the future.Check List
Tests
Release note