-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Support explicitly getting health feedback information by calling RPC #17008
server: Support explicitly getting health feedback information by calling RPC #17008
Conversation
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
…request-health-feedback
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
[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 submitting an approval review. |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
…request-health-feedback
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
cc @crazycs520 PTAL thanks! |
if requested_feedback.is_none() { | ||
requested_feedback = Some(self.gen_health_feedback_pb()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this logic be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is explicit health fetch request in the batch commands I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it a complete API, GetHealthFeedbackResponse
carries the health feedback information. We don't actually use it for now, but it makes further potential uses possible. When it's used in batch_commands, the feedback information will also be attached to the BatchCommandsResponse
, so that it can be easily handled by the batch client, and it's transparent to the batch client whether the feedback is periodically sent or explicitly requested.
Here the code is used to check a BatchCommandsResponse
, and attach the information if explicitly requested (by checking whether there is one or more GetHealthFeedbackResponse
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/server/service/kv.rs
Outdated
@@ -1042,7 +1042,9 @@ impl<E: Engine, L: LockManager, F: KvFormat> Tikv for Service<E, L, F> { | |||
GRPC_RESP_BATCH_COMMANDS_SIZE.observe(r.request_ids.len() as f64); | |||
// TODO: per thread load is more reasonable for batching. | |||
r.set_transport_layer_load(grpc_thread_load.total_load() as u64); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated blank lines?
if requested_feedback.is_none() { | ||
requested_feedback = Some(self.gen_health_feedback_pb()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is explicit health fetch request in the batch commands I think.
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
@crazycs520: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. 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 ti-community-infra/tichi repository. |
@crazycs520: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. 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 ti-community-infra/tichi repository. |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
/merge |
@MyonKeminta: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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: cb9e4f4
|
/release |
What is changed and how it works?
Issue Number: Close #16297
What's Changed:
Related changes
PR to update
pingcap/docs
/pingcap/docs-cn
:Need to cherry-pick to the release branch
Requires: Add GetHealthFeedback RPC pingcap/kvproto#1239
Check List
Tests
Side effects
Release note