Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hhwyt
Copy link

@hhwyt hhwyt commented Nov 6, 2024

For RaftMessage send & send wait duration metric, we need the last_observed_time field for RaftMessage and BatchRaftMessage. More details see: tikv/tikv#17735.

@ti-chi-bot ti-chi-bot bot added the size/XS label Nov 6, 2024
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -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;
Copy link
Member

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?

Copy link
Author

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:

  1. RaftStore sends a RaftMessage to the RaftClient, placing the RaftMessage into the RaftClient buffer. (in RaftClient::send.)
  2. 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.

Copy link
Member

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.

Copy link

ti-chi-bot bot commented Nov 12, 2024

@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.

Copy link
Contributor

@v01dstar v01dstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

ti-chi-bot bot commented Nov 14, 2024

@v01dstar: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

lgtm

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.

Copy link
Contributor

@LykxSassinator LykxSassinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Nov 15, 2024

@LykxSassinator: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

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.

@glorv
Copy link
Contributor

glorv commented Nov 15, 2024

@overvenus PTAL

Copy link

ti-chi-bot bot commented Nov 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-15 09:05:17.82562336 +0000 UTC m=+606280.016492357: ☑️ agreed by glorv.

Copy link

ti-chi-bot bot commented Nov 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Connor1996, glorv, LykxSassinator, v01dstar
Once this PR has been reviewed and has the lgtm label, please assign overvenus, zhangjinpeng87 for approval, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hhwyt
Copy link
Author

hhwyt commented Nov 15, 2024

/assign @overvenus

@hhwyt
Copy link
Author

hhwyt commented Nov 15, 2024

/cc @overvenus PTAL, thx~

@hhwyt
Copy link
Author

hhwyt commented Nov 15, 2024

/assign @hhwyt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants