Skip to content

kvrpcpb: report noisy resource groups in HealthFeedback - #1544

Open
mittalrishabh wants to merge 1 commit into
pingcap:masterfrom
mittalrishabh:noisy-groups-health-feedback
Open

mittalrishabh wants to merge 1 commit into
pingcap:masterfrom
mittalrishabh:noisy-groups-health-feedback

Conversation

@mittalrishabh

@mittalrishabh mittalrishabh commented Sep 22, 2026 •

Copy link
Copy Markdown

TiKV already knows which resource groups it blames for its own overload -- ResourceGroupManager keeps the set in noisy_groups and refreshes it on the control tick
Carry the set on HealthFeedback instead, which is already attached to batch responses on a timer, so a client learns the whole set from any response.

Summary by CodeRabbit

  • New Features
    • Health feedback can now report which groups a store identifies as noisy.
    • Reports distinguish unsupported group reporting from an explicit report that names no groups. Each report replaces the store’s previously reported group information.

@ti-chi-bot

ti-chi-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hbisheng, lzmhhh123 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details 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

@ti-chi-bot ti-chi-bot Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 22, 2026
@pingcap-cla-assistant

pingcap-cla-assistant Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 6cc94524-1c19-454a-ae39-080725635611

📥 Commits

Reviewing files that changed from the base of the PR and between 09946a8 and fb412a0.

⛔ Files ignored due to path filters (2)
  • pkg/kvrpcpb/kvrpcpb.pb.go is excluded by !**/*.pb.go
  • scripts/proto.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • proto/kvrpcpb.proto

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The protobuf schema adds a NoisyGroups message and a noisy_groups field to HealthFeedback. The field comments distinguish an unset report from an empty group list.

Changes

Health feedback reporting

Layer / File(s) Summary
Noisy groups contract
proto/kvrpcpb.proto
HealthFeedback now has a noisy_groups field. NoisyGroups contains repeated group names. Comments describe unset and empty reports and state that each message replaces prior knowledge for that store.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: disksing

Merge Risk: ⚪ Minimal · up to fb412

No actionable issue remains in the supplied health-feedback contract; the change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding reporting of noisy resource groups to HealthFeedback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads the groups with care,
New names hop into the message there.
An empty list says none are blamed,
An unset field leaves support unnamed.
The schema grows by one small door.

Comment @coderabbitai help to get the list of available commands.

TiKV already knows which resource groups it blames for its own overload --
`ResourceGroupManager` keeps the set in `noisy_groups` and refreshes it on the
control tick -- but the only way that verdict reaches a client today is the
`|noisy_tenant` suffix on a `ServerIsBusy` reason, which arrives only when a
request from that group is actually rejected. Every group has to be rejected
once to be discovered, and the client has no way to learn that a group stopped
being noisy.

Carry the set on `HealthFeedback` instead, which is already attached to batch
responses on a timer, so a client learns the whole set from any response.

`noisy_groups` is a message rather than a bare repeated field so that a store
which does not report the set at all stays distinguishable from one reporting
an empty set: the former leaves the field unset, the latter sends an empty
`names`, and only the latter licenses a client to clear what it knew.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 15db782)

Signed-off-by: rishabh mittal <mittalrishabh@gmail.com>
@mittalrishabh
mittalrishabh force-pushed the noisy-groups-health-feedback branch from 09946a8 to fb412a0 Compare September 23, 2026 07:07
@ti-chi-bot

ti-chi-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-linked-issue label, please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123 or Issue Number: ref #456.

📖 For more info, you can check the "Contribute Code" section in the development guide.

@mittalrishabh

Copy link
Copy Markdown
Author

mornyx PTAL

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

Labels

do-not-merge/needs-linked-issue size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant