Skip to content

server,resourcemanager: route metadata writes via PD#10260

Draft
okJiang wants to merge 2 commits intotikv:masterfrom
okJiang:codex/rm-pr6-route-metadata-via-pd
Draft

server,resourcemanager: route metadata writes via PD#10260
okJiang wants to merge 2 commits intotikv:masterfrom
okJiang:codex/rm-pr6-route-metadata-via-pd

Conversation

@okJiang
Copy link
Member

@okJiang okJiang commented Feb 27, 2026

What problem does this PR solve?

After watcher scaffold, metadata write traffic should be handled by PD while RM focuses on token/read serving and tracks metadata via watcher updates.

Issue Number: ref #9737

What is changed and how does it work?

This branch is intended as PR6 and functionally depends on #10259.

Because the head branch is in a fork and I cannot push the base branch to tikv/pd, GitHub cannot create a stacked PR with base codex/rm-pr4-metadata-watcher-scaffold in upstream. So this draft currently includes PR4 commit(s) in history as dependency.

Behavior changes in this PR layer:

  • PD fallback-disabled proxy handles metadata writes locally via PD metadata manager
  • RM gRPC metadata write APIs reject writes with FailedPrecondition (must write via PD)
  • RM standalone server startup now applies metadata-write reject flag consistently
  • Redirector integration test verifies:
    • direct RM metadata writes are rejected
    • PD writes succeed
    • RM eventually observes create/modify/delete via watcher
server,resourcemanager: route metadata writes via PD

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has HTTP API interfaces changed (behavioral routing change)

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release note

None.

Signed-off-by: okjiang <819421878@qq.com>
Signed-off-by: okjiang <819421878@qq.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 27, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Feb 27, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 27, 2026

[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 rleungx 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

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Important

Review skipped

Draft detected.

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.

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
  • Post copyable unit tests in a comment

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 and usage tips.

@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. 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