Skip to content

resourcecontrol, tikvrpc: backport RC paging pre-charge hint#2020

Merged
ti-chi-bot[bot] merged 1 commit into
tikv:release-nextgen-202603from
JmPotato:codex/rc-paging-precharge-release-nextgen-202603
Jul 16, 2026
Merged

resourcecontrol, tikvrpc: backport RC paging pre-charge hint#2020
ti-chi-bot[bot] merged 1 commit into
tikv:release-nextgen-202603from
JmPotato:codex/rc-paging-precharge-release-nextgen-202603

Conversation

@JmPotato

@JmPotato JmPotato commented Jul 14, 2026

Copy link
Copy Markdown
Member

Problem

Backport the client-go transport required by the merged tikv/pd#11003 so TiDB can provide a predicted read-bytes hint for request-side resource-control pre-charge on release-nextgen-202603.

Changes

  • Consume the PD client from the release-nextgen-202603 merge of client/resource_group: backport RC pre-charge and runtime state pd#11003 (v0.0.0-20260716095117-1636e69a936b).
  • Add tikvrpc.Request.PredictedReadBytes and expose the hint through resource-control RequestInfo.
  • Classify coprocessor requests so PD only applies paging pre-charge to eligible read requests.
  • Keep the release branch's Go toolchain and PD GC, MetaStorage, and keyspace client APIs unchanged.

The hint is internal to client-go and does not change the TiKV wire protocol. A zero hint preserves the existing settlement-only behavior.

Dependencies and source

Tests

go test --tags=intest ./...
(cd integration_tests && go test ./... -run '^$' -count=0)
git diff --check upstream/release-nextgen-202603...HEAD

Known CI results:

  • GitHub Actions integration-tikv failed in the timing-sensitive TestSnapshotFail/TestRetryPointGetResolveTS, outside the changed resource-control paths. A job-only rerun requires maintainer permission.
  • Prow pull-integration-test-release-nextgen fails because the release branch lacks the TiDB-like key encoding test fix from tests: use TiDB-like keys in next-gen integration tests #2010 (00f57d88370fa62fb83e895f05a73fabb499904e). That fix should be backported separately rather than mixed into this feature backport.

Compatibility

No wire-protocol change. Existing callers that do not set PredictedReadBytes retain the previous behavior. The backport intentionally keeps the release branch's existing PD client APIs and dependency baseline.

None

@ti-chi-bot ti-chi-bot Bot added the dco-signoff: yes Indicates the PR's author has signed the dco. label Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e2b9892-25a0-44a2-b048-7189ca24e5bb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@ti-chi-bot ti-chi-bot Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 14, 2026
…re-charge (tikv#1947)

close tikv#1953\n\nSigned-off-by: Yuhao Zhang <yhzhang00@outlook.com>

(cherry picked from commit 01bd8f9)
Signed-off-by: JmPotato <github@ipotato.me>
@JmPotato JmPotato force-pushed the codex/rc-paging-precharge-release-nextgen-202603 branch from f9f4b2b to b5a120c Compare July 16, 2026 10:07
@ti-chi-bot ti-chi-bot Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 16, 2026
@ti-chi-bot ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 16, 2026
@JmPotato

Copy link
Copy Markdown
Member Author

/retest

@ti-chi-bot

ti-chi-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

Details

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-sigs/prow repository.

@YuhaoZhang00

Copy link
Copy Markdown
Contributor

/retest

@ti-chi-bot

ti-chi-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

@JmPotato: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-test-release-nextgen b5a120c link false /test pull-integration-test-release-nextgen

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot Bot added the lgtm label Jul 16, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, rleungx, YuhaoZhang00

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

The pull request process is described 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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 16, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-07-16 12:21:02.946831888 +0000 UTC m=+889048.982926943: ☑️ agreed by cfzjywxk.
  • 2026-07-16 13:17:47.432724613 +0000 UTC m=+892453.468819659: ☑️ agreed by rleungx.

@ti-chi-bot ti-chi-bot Bot merged commit 520a563 into tikv:release-nextgen-202603 Jul 16, 2026
18 of 20 checks passed
@JmPotato JmPotato deleted the codex/rc-paging-precharge-release-nextgen-202603 branch July 16, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants