-
Notifications
You must be signed in to change notification settings - Fork 726
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: tso server compare address without scheme #8283
Conversation
pkg/keyspace/tso_keyspace_group.go
Outdated
@@ -874,7 +875,7 @@ func (m *GroupManager) SetPriorityForKeyspaceGroup(id uint32, node string, prior | |||
inKeyspaceGroup := false | |||
members := make([]endpoint.KeyspaceGroupMember, 0, len(kg.Members)) | |||
for _, member := range kg.Members { | |||
if member.Address == node { | |||
if typeutil.CompareURLsWithoutScheme(member.Address, node) { |
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.
Please add a comment to explain why we do 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.
Rest LGTM
@iosmanthus: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: lhy1024 <admin@liudos.us>
@iosmanthus: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8283 +/- ##
==========================================
- Coverage 77.42% 77.29% -0.13%
==========================================
Files 471 471
Lines 61405 61411 +6
==========================================
- Hits 47540 47468 -72
- Misses 10308 10385 +77
- Partials 3557 3558 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
// It compares the address without the scheme. | ||
// Otherwise, it will not work when we update the scheme from http to https. | ||
// Issue: https://github.com/tikv/pd/issues/8284 | ||
func (m *KeyspaceGroupMember) CompareAddress(addr string) bool { |
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 not directly use EqualBaseURLs?
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.
Avoid to add comments anywhere, so wrap 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.
Avoid to add comments anywhere, so wrap it.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HuSharp, iosmanthus, 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 |
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: Close #8284
What is changed and how does it work?
Check List
Tests
Release note