Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: add sync bundles logic for creating and droping #28037

Merged
merged 28 commits into from
Sep 23, 2021
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9f5aff4
add the policy cache and sync logic
AilinKid Sep 14, 2021
6985eae
fix the detach policy dependency
AilinKid Sep 14, 2021
96e57ec
add alter policy should revise all the depended ids
AilinKid Sep 15, 2021
78f54fb
remove redundant code
AilinKid Sep 15, 2021
1ec2752
defer
AilinKid Sep 16, 2021
b8bbc22
add test
AilinKid Sep 16, 2021
ad73f7b
rm policy dependency
AilinKid Sep 17, 2021
db88515
rebase
AilinKid Sep 17, 2021
70b8588
.
AilinKid Sep 17, 2021
d2f6200
.
AilinKid Sep 17, 2021
9ff238e
.
AilinKid Sep 17, 2021
b07f55b
fix test
AilinKid Sep 18, 2021
0afe28d
address comment
AilinKid Sep 18, 2021
a761b0e
address comment
AilinKid Sep 18, 2021
5637742
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 22, 2021
c45998b
fix test for show create table with placement policy
AilinKid Sep 22, 2021
032d06a
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 22, 2021
4e0d7ad
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 22, 2021
34ad749
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 22, 2021
88b081b
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 22, 2021
de6fef3
remove the dbs when reset the bundle
AilinKid Sep 22, 2021
21bb88a
change the table level rule to cover the all the range with specified…
AilinKid Sep 23, 2021
a7766a7
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 23, 2021
fc17d51
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 23, 2021
d08239e
fix the test
AilinKid Sep 23, 2021
b6ae1cc
Merge branch 'master' into drop-policy-apply-table
AilinKid Sep 23, 2021
078fe50
Merge branch 'master' into drop-policy-apply-table
lcwangchao Sep 23, 2021
44c2283
Merge branch 'master' into drop-policy-apply-table
ti-chi-bot Sep 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change the table level rule to cover the all the range with specified…
… table id

Signed-off-by: ailinkid <314806019@qq.com>
  • Loading branch information
AilinKid committed Sep 23, 2021
commit 21bb88a66087a80af90be9f20925aae356c7213b
5 changes: 3 additions & 2 deletions ddl/placement/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,9 @@ func (b *Bundle) Tidy() error {
// Reset resets the bundle ID and keyrange of all rules.
func (b *Bundle) Reset(newID int64) *Bundle {
b.ID = GroupID(newID)
startKey := hex.EncodeToString(codec.EncodeBytes(nil, tablecodec.GenTableRecordPrefix(newID)))
endKey := hex.EncodeToString(codec.EncodeBytes(nil, tablecodec.GenTableRecordPrefix(newID+1)))
// Involve all the table level objects.
startKey := hex.EncodeToString(codec.EncodeBytes(nil, tablecodec.GenTablePrefix(newID)))
endKey := hex.EncodeToString(codec.EncodeBytes(nil, tablecodec.GenTablePrefix(newID+1)))
for _, rule := range b.Rules {
rule.GroupID = b.ID
rule.StartKeyHex = startKey
Expand Down