Skip to content

region_cache: return nil reason from GetTiFlashRPCContext (#1959)#1961

Open
ti-chi-bot wants to merge 2 commits into
tikv:tidb-8.5-20260113-v8.5.4from
ti-chi-bot:cherry-pick-1959-to-tidb-8.5-20260113-v8.5.4
Open

region_cache: return nil reason from GetTiFlashRPCContext (#1959)#1961
ti-chi-bot wants to merge 2 commits into
tikv:tidb-8.5-20260113-v8.5.4from
ti-chi-bot:cherry-pick-1959-to-tidb-8.5-20260113-v8.5.4

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

This is an automated cherry-pick of #1959

Return a reason when GetTiFlashRPCContext returns nil to help callers know why the TiFlash RPC context is unavailable.

Summary by CodeRabbit

  • New Features

    • Exposed detailed TiFlash RPC-context unavailability reasons and structured details for clearer diagnostics.
  • Improvements

    • More explicit handling and reporting when TiFlash contexts are unavailable (including store lists and specific causes).
    • Improved TiFlash store selection with better load-balancing and label-based filtering for more reliable routing.

Review Change Stack

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-tidb-8.5-20260113-v8.5.4 labels May 11, 2026
@ti-chi-bot
Copy link
Copy Markdown
Member Author

@gengliqi This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

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: 171a950d-7a12-441e-b8d7-ecd111bc7171

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

Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 11, 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 ask for approval from gengliqi. 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

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/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-tidb-8.5-20260113-v8.5.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants