-
Notifications
You must be signed in to change notification settings - Fork 752
tools: isolate keyspace according to the given label #10121
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (70.90%) is below the target coverage (74.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #10121 +/- ##
==========================================
+ Coverage 78.38% 78.39% +0.01%
==========================================
Files 518 518
Lines 69476 69584 +108
==========================================
+ Hits 54456 54551 +95
- Misses 11066 11073 +7
- Partials 3954 3960 +6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
dfe1875 to
cc03035
Compare
|
/retest |
| } | ||
|
|
||
| // Generate key ranges for the keyspace | ||
| keyspaceID32 := uint32(keyspaceID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check whether keyspace id is valid?
| GroupID: groupID, | ||
| ID: fmt.Sprintf("keyspace-%d-rule", keyspaceID), | ||
| Role: pd.Voter, | ||
| Count: 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the cluster is 5 replicas, what will happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, maybe we can consider it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding a TODO for it?
| keyspaceIDBytes := make([]byte, 4) | ||
| nextKeyspaceIDBytes := make([]byte, 4) | ||
| binary.BigEndian.PutUint32(keyspaceIDBytes, id) | ||
| binary.BigEndian.PutUint32(nextKeyspaceIDBytes, id+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it overflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is the same as MakeRegionBound in keyspace/util.go
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
|
/retest |
1 similar comment
|
/retest |
|
/retest-required |
lhy1024
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest LGTM. I am worried about hard code about placement rule.
| groupID := fmt.Sprintf("keyspace-%d", keyspaceID) | ||
| bundle := &pd.GroupBundle{ | ||
| ID: groupID, | ||
| Index: 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is index100 expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I don't have any idea about this value.
Signed-off-by: Ryan Leung <[email protected]>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lhy1024 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #10122
What is changed and how does it work?
Check List
Tests
Release note