status server: add /ready API#18237
Conversation
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
|
|
||
| // A reference for updating the server readiness state, which is queried by | ||
| // the status server's /ready API. | ||
| pub server_readiness: Arc<ServerReadiness>, |
There was a problem hiding this comment.
Just want to start a discussion.
Seems that, this SeverReadiness can be a global variable instead of a state being propagated through different modules.
What do you think?
There was a problem hiding this comment.
Using a global variable sounds feasible because this ServerReadiness struct should only be created once. It will also make the implementation easier by avoiding the propagation. But I'm not sure about the idiomatic way of using global variables in Rust; need to check some examples first.
There was a problem hiding this comment.
Updated the code to use a global variable—no need to pass it around any more! Thanks for the suggestion
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
|
@v01dstar @LykxSassinator PTAL again, thanks! |
|
/hold |
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
|
/unhold |
Co-authored-by: lucasliang <nkcs_lykx@hotmail.com> Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LykxSassinator, v01dstar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
@hbisheng: 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. DetailsInstructions 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 is changed and how it works?
Issue Number: Close #18244
What's Changed:
Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Manual test steps:
Observation:
The ready API began returning status 200 after the Raft logs have caught up, with the time aligned with the tikv logs and the "Server is busy" metrics.
Side effects
Release note