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

mcs: fix tso server address compare #8289

Merged
merged 4 commits into from
Jun 24, 2024
Merged

mcs: fix tso server address compare #8289

merged 4 commits into from
Jun 24, 2024

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jun 14, 2024

What problem does this PR solve?

Issue Number: Close #8284

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

After

root@serverless-cluster-pd-2:/# curl -s http://127.0.0.1:2379/pd/api/v2/tso/keyspace-groups | jq '.[0].members'
[
  {
    "address": "http://pd-tso-server-0.tso-service.tidb-serverless.svc:2379/",
    "priority": 200
  },
  {
    "address": "http://pd-tso-server-1.tso-service.tidb-serverless.svc:2379/",
    "priority": 300
  }
]
root@serverless-cluster-pd-2:/# curl -k http://127.0.0.1:2379/pd/api/v2/ms/members/tso
[
    {
        "service-addr": "https://pd-tso-server-0.tso-service.tidb-serverless.svc:2379/",
        "version": "v7.1.1-serverless",
        "git-hash": "592e1d8525896dc6e0c2f91b4991de11c86353fc",
        "deploy-path": "/pd-server",
        "start-timestamp": 1718952710
    },
    {
        "service-addr": "https://pd-tso-server-1.tso-service.tidb-serverless.svc:2379/",
        "version": "v7.1.1-serverless",
        "git-hash": "592e1d8525896dc6e0c2f91b4991de11c86353fc",
        "deploy-path": "/pd-server",
        "start-timestamp": 1718952694
    }
]

Release note

None.

Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 14, 2024
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.45%. Comparing base (26e90e9) to head (54255c2).

Current head 54255c2 differs from pull request most recent head 2686731

Please upload reports for the commit 2686731 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8289      +/-   ##
==========================================
+ Coverage   77.31%   77.45%   +0.14%     
==========================================
  Files         470      470              
  Lines       61517    61385     -132     
==========================================
- Hits        47561    47547      -14     
+ Misses      10394    10283     -111     
+ Partials     3562     3555       -7     
Flag Coverage Δ
unittests 77.45% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@lhy1024 lhy1024 requested review from JmPotato and rleungx June 24, 2024 06:51
@@ -164,7 +163,7 @@ func (s *Service) FindGroupByKeyspaceID(
Address: member.Address,
// TODO: watch the keyspace groups' primary serving address changes
// to get the latest primary serving addresses of all keyspace groups.
IsPrimary: strings.EqualFold(member.Address, am.GetLeaderAddr()),
IsPrimary: member.CompareAddress(am.GetLeaderAddr()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep consistent with cse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, pd-cse will be switched to release-7.5

Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 24, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 24, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 24, 2024

@lhy1024: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-realcluster-test 2686731 link false /test pull-integration-realcluster-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 24, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 24, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 24, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-24 09:17:40.125954894 +0000 UTC m=+624786.611443719: ☑️ agreed by rleungx.
  • 2024-06-24 09:47:21.912664919 +0000 UTC m=+626568.398153751: ☑️ agreed by JmPotato.

@ti-chi-bot ti-chi-bot bot merged commit 0ec084b into tikv:master Jun 24, 2024
16 of 17 checks passed
@lhy1024 lhy1024 deleted the scheme branch June 24, 2024 09:59
lhy1024 added a commit to ti-chi-bot/pd that referenced this pull request Aug 1, 2024
close tikv#8284

Signed-off-by: lhy1024 <admin@liudos.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mcs: tso servers cannot election after replacing http with https
3 participants