-
Notifications
You must be signed in to change notification settings - Fork 729
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
api: Add the readiness endpoint for PD #5685
base: master
Are you sure you want to change the base?
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. 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 submitting an approval review. |
I think once member down, the peer role still a follower, do not change to the learner. |
Hi @nolouch, thanks for the feedback. Added a check for the lag between the leader's committed index and the current server's applied index, if the lag is larger than 5000, then the readiness check fails. What about that? cc @rleungx |
Codecov ReportBase: 75.72% // Head: 75.57% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5685 +/- ##
==========================================
- Coverage 75.72% 75.57% -0.16%
==========================================
Files 342 330 -12
Lines 34828 32986 -1842
==========================================
- Hits 26373 24928 -1445
+ Misses 6213 5906 -307
+ Partials 2242 2152 -90
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Hanlin Shi <[email protected]>
Signed-off-by: Hanlin Shi <[email protected]>
Signed-off-by: Hanlin Shi <[email protected]>
Signed-off-by: Hanlin Shi <[email protected]>
727e145
to
c0f6996
Compare
Some updates on the issue. I've updated the response payload schema to include richer information. Set up a TiDB cluster using the patch and it seems the response we got from PD is expected:
For my next steps, I'm going to work together with some of our users and see if it can resolve issues in their scenario, and will also update the test cases in parallel. |
Signed-off-by: Hanlin Shi <[email protected]>
Signed-off-by: Hanlin Shi <[email protected]>
Added some basic tests and seems working:
Wondering do you have any concerns about the endpoint naming? The meaning for |
/retest |
@wuhuizuo: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
What problem does this PR solve?
Added a readiness endpoint that exposes the information whether the corresponding etcd member of the PD is synced with the leader.
Issue Number: Close #5658
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tiup
:Release note