-
Notifications
You must be signed in to change notification settings - Fork 717
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
Conversation
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. |
[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 |
/merge |
@nolouch: We have migrated to builtin 👉 Please use
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. |
@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. |
What problem does this PR solve?
Issue Number: Ref #8135
What is changed and how does it work?
tiup playground v8.0.0 --kv.binpath ./pd-simulator --kv=1 --db=0 --kv.config=../conf/simconfig.toml --pd 3
Test Result
tiup playground v8.0.0 --kv.binpath ./pd-simulator --kv=1 --db=0 --kv.config=../conf/simconfig.toml --pd 3
cluster metrics
add node to trigger balance
after
![image](https://private-user-images.githubusercontent.com/53859786/340552268-32a4c2a2-d458-4a1a-bc25-1a6b9aac8192.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMzM4MDMsIm5iZiI6MTcyNDEzMzUwMywicGF0aCI6Ii81Mzg1OTc4Ni8zNDA1NTIyNjgtMzJhNGMyYTItZDQ1OC00YTFhLWJjMjUtMWE2YjlhYWM4MTkyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA1NTgyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJmZjBjZjYyM2VkODc3NTI2MTVlZDA0ZGNlZjA1Y2EzYTM2NDBkZGE2M2JlZTk1NTExOWE5MDFhMWRiMmFiODQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oJyE3rLHWpQfHDgHalLzH7VEnOJpJf15-JZGBdm-ZZg)
![image](https://private-user-images.githubusercontent.com/53859786/340549232-8fb22277-f080-4373-b1cc-63478ae59889.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMzM4MDMsIm5iZiI6MTcyNDEzMzUwMywicGF0aCI6Ii81Mzg1OTc4Ni8zNDA1NDkyMzItOGZiMjIyNzctZjA4MC00MzczLWIxY2MtNjM0NzhhZTU5ODg5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czR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ucy6LA)
curl --location --request POST 'http://127.0.0.1:20180/event?event=add-node'
test leader change
run
./pd-ctl member
firstly to check leadertransfer leader
$ ./pd-ctl member leader transfer pd-1 Success!
heartbeat upload
![image](https://private-user-images.githubusercontent.com/53859786/340550737-b24d21bd-3698-4350-a3f3-d6ad2d9f0f20.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMzM4MDMsIm5iZiI6MTcyNDEzMzUwMywicGF0aCI6Ii81Mzg1OTc4Ni8zNDA1NTA3MzctYjI0ZDIxYmQtMzY5OC00MzUwLWEzZjMtZDZhZDJkOWYwZjIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA1NTgyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTliZjc3ZjdjMDA2NWYzZTY2NDNmNWI5OTZmOTAzYTdlYmNlNDBjZGM2ZjEwZjJhNGU0ZWRhN2Y3ZWRiOWFmNGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ScKski6y7URc24xqwbP1jyNAVxegSCWt1s3yGBAt1Sk)
![image](https://private-user-images.githubusercontent.com/53859786/340550612-fb60e53c-7b13-4b2a-bbfb-70c9db933ad1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMzM4MDMsIm5iZiI6MTcyNDEzMzUwMywicGF0aCI6Ii81Mzg1OTc4Ni8zNDA1NTA2MTItZmI2MGU1M2MtN2IxMy00YjJhLWJiZmItNzBjOWRiOTMzYWQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA1NTgyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjNDlmZjYwOWE2NmNlMjk5YzY0N2M0YTc0NjljZDcyZDMyYTBiZWNiMmY2MmY0YzJlNTU2ZTM2ZGU1MDA4ZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.dMqUKJALPcvnk7dskhqQI1tFeMnPNSj_HACcNrcelMQ)
remove node to trigger balance
curl --location --request POST 'http://127.0.0.1:20180/event?event=down-node'
Check List
Tests
Release note