Skip to content

Remove useless grpc connections (#233)#237

Open
ti-chi-bot wants to merge 2 commits into
tikv:release-8.5from
ti-chi-bot:cherry-pick-233-to-release-8.5
Open

Remove useless grpc connections (#233)#237
ti-chi-bot wants to merge 2 commits into
tikv:release-8.5from
ti-chi-bot:cherry-pick-233-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

This is an automated cherry-pick of #233

Root cause: illegal connections are not cleaned up when grpc call is failed
Fix: We remove useless connections when grpc call fails with unavailable or cancelled codes
Related issue: pingcap/tiflash#9806

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling and propagation of gRPC errors, ensuring failed RPCs mark unhealthy endpoints for removal.
    • More reliable cleanup of unavailable connections during background scans.
  • New Features

    • Background health monitoring and automatic removal of bad connections.
    • RPC client now runs as a background task and is stopped earlier during cluster shutdown for more predictable lifecycle behavior.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added contribution This PR is from a community contributor. 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-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels May 22, 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 22, 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: 5434f039-1741-4af2-89cb-b18bcfd39b27

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 ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels May 22, 2026
@ti-chi-bot ti-chi-bot Bot added the lgtm label May 22, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gengliqi, wshwsh12

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 May 22, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 22, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-05-22 10:34:32.314015011 +0000 UTC m=+2742.284180067: ☑️ agreed by gengliqi.
  • 2026-05-22 10:35:46.730759148 +0000 UTC m=+2816.700924205: ☑️ agreed by wshwsh12.

@gengliqi
Copy link
Copy Markdown
Member

/retest

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

Labels

approved contribution This PR is from a community contributor. 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. lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants