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

tools/simulator: support simulator with multiple pds #8304

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jun 18, 2024

What problem does this PR solve?

Issue Number: Ref #8135

What is changed and how does it work?

  • support multiple pds , can run command like that
    tiup playground v8.0.0 --kv.binpath ./pd-simulator --kv=1 --db=0 --kv.config=../conf/simconfig.toml --pd 3
  • support retry client to check leader url
  • remove redundant client init and put in NewRetryClient

Test Result

tiup playground v8.0.0 --kv.binpath ./pd-simulator --kv=1 --db=0 --kv.config=../conf/simconfig.toml --pd 3

cluster metrics

image image

add node to trigger balance

after curl --location --request POST 'http://127.0.0.1:20180/event?event=add-node'
image
image
image

test leader change

run ./pd-ctl member firstly to check leader

	...
  "leader": {
    "name": "pd-0",
    "member_id": 3474484975246189105,
    "peer_urls": [
      "http://127.0.0.1:2380"
    ],
    "client_urls": [
      "http://127.0.0.1:2379"
    ],
	...

transfer leader

$ ./pd-ctl member leader transfer pd-1
Success!

heartbeat upload
image
image

remove node to trigger balance

curl --location --request POST 'http://127.0.0.1:20180/event?event=down-node'

image image

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Release note

None.

Signed-off-by: husharp <[email protected]>
@HuSharp HuSharp requested review from nolouch, lhy1024 and rleungx June 18, 2024 05:40
@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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 18, 2024
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.27%. Comparing base (fbd6bd2) to head (d140be6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8304      +/-   ##
==========================================
- Coverage   77.38%   77.27%   -0.11%     
==========================================
  Files         470      470              
  Lines       61356    61356              
==========================================
- Hits        47480    47413      -67     
- Misses      10310    10381      +71     
+ Partials     3566     3562       -4     
Flag Coverage Δ
unittests 77.27% <ø> (-0.11%) ⬇️

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 18, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nolouch, 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 added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-18 09:17:16.887705035 +0000 UTC m=+106363.373193860: ☑️ agreed by rleungx.
  • 2024-06-19 06:31:34.742986805 +0000 UTC m=+182821.228475635: ☑️ agreed by nolouch.

@nolouch
Copy link
Contributor

nolouch commented Jun 19, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented Jun 19, 2024

@nolouch: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: Proposal: Strengthen configuration change approval.

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 ti-community-infra/tichi repository.

Copy link
Contributor

ti-chi-bot bot commented Jun 19, 2024

@HuSharp: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 89ca8df into tikv:master Jun 19, 2024
21 checks passed
@HuSharp HuSharp deleted the simulator_with_multiple_pds branch June 19, 2024 07:15
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants