-
Notifications
You must be signed in to change notification settings - Fork 720
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
server/api: add an API to configure failpoints in runtime #3488
Conversation
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #3488 +/- ##
==========================================
+ Coverage 74.50% 74.52% +0.01%
==========================================
Files 244 244
Lines 24034 24039 +5
==========================================
+ Hits 17907 17915 +8
- Misses 4508 4512 +4
+ Partials 1619 1612 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests 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. |
This pull request has been accepted and is ready to merge. Commit hash: 9126856
|
Signed-off-by: Yilin Chen <sticnarf@gmail.com> Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com> Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
What is changed and how it works?
It would be easier to construct test cases if we could configure failpoint in runtime. Both TiKV and TiDB support such an API.
This PR adds
/pd/api/v1/fail/
to configure failpoints.Check List
Tests
First set
GO_FAILPOINTS="github.com/tikv/pd/server/api/enableFailpointAPI=return"
environment variable to enable this API.Then, we can run HTTP requests like this to set failpoints:
And we can also get the enabled failpoint list:
Code changes
Release note