-
Notifications
You must be signed in to change notification settings - Fork 219
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
Add last_observed_time for raft messages #1276
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: hhwyt <[email protected]>
|
@@ -29,6 +29,8 @@ message RaftMessage { | |||
bytes extra_ctx = 11; | |||
|
|||
disk_usage.DiskUsage disk_usage = 12; | |||
// Used to measure the send wait duration. | |||
uint64 last_observed_time = 13; |
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.
As BatchRaftMessage
has one, why bother recording it here?
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.
@Connor1996 There are two steps:
- RaftStore sends a RaftMessage to the RaftClient, placing the RaftMessage into the RaftClient buffer. (in RaftClient::send.)
- The RaftClient batches RaftMessages into a BatchMessageBuffer and flushes them as BatchRaftMessages to gRPC.
The last_observed_time in RaftMessage is used to monitor the first step, where BatchRaftMessage has not yet been created.
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.
Looks like we don't need to add a new field in protobuf, as step 1 occurs within the process with no inter-network communication.
@Connor1996: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
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
@v01dstar: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
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
@LykxSassinator: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
@overvenus PTAL |
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Connor1996, glorv, LykxSassinator, v01dstar The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @overvenus |
/cc @overvenus PTAL, thx~ |
/assign @hhwyt |
For RaftMessage send & send wait duration metric, we need the
last_observed_time
field for RaftMessage and BatchRaftMessage. More details see: tikv/tikv#17735.