-
Notifications
You must be signed in to change notification settings - Fork 721
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
mcs/transfer: Added checks for available tso nodes #8530
Conversation
Signed-off-by: husharp <[email protected]>
@@ -65,7 +66,7 @@ func (suite *memberTestSuite) SetupTest() { | |||
|
|||
// TSO | |||
nodes := make(map[string]bs.Server) | |||
for i := 0; i < 3; i++ { | |||
for i := 0; i < constant.DefaultKeyspaceGroupReplicaCount; i++ { |
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.
why reduce it?
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.
Because DefaultKeyspaceGroupReplicaCount
limits the number of tso
nodes.
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.
We do need to test the case whose TSO node is more than DefaultKeyspaceGroupReplicaCount
.
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.
Added restrictions and checks to the TransferPrimary
function and refined the tests.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8530 +/- ##
==========================================
- Coverage 77.64% 77.61% -0.04%
==========================================
Files 474 474
Lines 61877 61883 +6
==========================================
- Hits 48044 48029 -15
- Misses 10300 10340 +40
+ Partials 3533 3514 -19
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: husharp <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: okJiang, rleungx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: Close #8529
What is changed and how does it work?
For a group only the
DefaultKeyspaceGroupReplicaCount
nodes can be transferred, we need to ensure that we can only transfer between available nodes.Check List
Tests
Release note