Skip to content

router: add port-based routing groups#1106

Merged
ti-chi-bot[bot] merged 1 commit intopingcap:mainfrom
YangKeao:pr/05-multi-cluster-router-port
Apr 10, 2026
Merged

router: add port-based routing groups#1106
ti-chi-bot[bot] merged 1 commit intopingcap:mainfrom
YangKeao:pr/05-multi-cluster-router-port

Conversation

@YangKeao
Copy link
Copy Markdown
Member

@YangKeao YangKeao commented Mar 19, 2026

What problem does this PR solve?

Issue Number: close #1100

Add port-based routing to the score-based router.

This PR introduces:

  • routing-rule = "port"
  • routing by the SQL listener port
  • cluster-scoped port groups
  • cross-cluster port-conflict detection and blocking

What is changed and how it works:

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Mar 19, 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 requested review from bb7133 and xhebox March 19, 2026 16:47
@ti-chi-bot ti-chi-bot bot added the size/XXL label Mar 19, 2026
@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch from df7706a to f6dd0c1 Compare March 19, 2026 17:33
@YangKeao YangKeao marked this pull request as ready for review March 19, 2026 17:37
@ti-chi-bot ti-chi-bot bot requested a review from djshow832 March 19, 2026 17:37
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 81.65138% with 20 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@17250b1). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/balance/router/port_conflict_detector.go 67.74% 7 Missing and 3 partials ⚠️
pkg/proxy/backend/backend_conn_mgr.go 0.00% 6 Missing and 1 partial ⚠️
pkg/balance/router/router_score.go 95.23% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1106   +/-   ##
=======================================
  Coverage        ?   67.38%           
=======================================
  Files           ?      146           
  Lines           ?    15357           
  Branches        ?        0           
=======================================
  Hits            ?    10348           
  Misses          ?     4310           
  Partials        ?      699           
Flag Coverage Δ
unit 67.38% <81.65%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@YangKeao
Copy link
Copy Markdown
Member Author

/test all

@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch 2 times, most recently from ac6b145 to 76c923a Compare March 20, 2026 06:20
@YangKeao
Copy link
Copy Markdown
Member Author

/test all

@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch 8 times, most recently from ceba1e1 to 623fdb8 Compare March 24, 2026 14:08
@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch 5 times, most recently from 192239f to f7b0611 Compare April 2, 2026 12:43
@YangKeao YangKeao marked this pull request as ready for review April 2, 2026 13:08
@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch 5 times, most recently from 531c352 to caad2ab Compare April 8, 2026 15:31
@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch 2 times, most recently from 1949f5a to eaebb69 Compare April 9, 2026 16:32
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
@YangKeao YangKeao force-pushed the pr/05-multi-cluster-router-port branch from eaebb69 to 9d50399 Compare April 9, 2026 16:36
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djshow832

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 added the lgtm label Apr 10, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 10, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-04-10 00:52:51.84523166 +0000 UTC m=+1090377.050591717: ☑️ agreed by djshow832.

@ti-chi-bot ti-chi-bot bot added the approved label Apr 10, 2026
@ti-chi-bot ti-chi-bot bot merged commit 8d8501d into pingcap:main Apr 10, 2026
6 checks passed
@YangKeao
Copy link
Copy Markdown
Member Author

/cherry-pick release-nextgen-202603

@ti-chi-bot
Copy link
Copy Markdown
Member

@YangKeao: new pull request created to branch release-nextgen-202603: #1124.

Details

In response to this:

/cherry-pick release-nextgen-202603

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 ti-community-infra/tichi repository.

ti-chi-bot bot pushed a commit that referenced this pull request Apr 13, 2026
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
Co-authored-by: Yang Keao <yangkeao@chunibyo.icu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add port-based routing rules and groups.

4 participants