balance, proxy: support evicting backends by config#1116
balance, proxy: support evicting backends by config#1116djshow832 wants to merge 1 commit intopingcap:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1116 +/- ##
=======================================
Coverage ? 67.43%
=======================================
Files ? 141
Lines ? 14959
Branches ? 0
=======================================
Hits ? 10087
Misses ? 4192
Partials ? 680
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce40a52848
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if conn.phase == phaseClosed || conn.forceClosing { | ||
| continue |
There was a problem hiding this comment.
Skip force-closing connections that are mid-redirect
CloseTimedOutFailoverConnections currently force-closes any non-closed connection, including ones in phaseRedirectNotify. With failover-timeout=0 (or a very short timeout), rebalance() can queue a redirect in Balance() and then immediately call ForceClose() on the same session in the same tick, which races with the pending redirect signal and can leave router bookkeeping inconsistent (incorrect connScore/list state when close and redirect callbacks arrive in opposite order). Guarding phaseRedirectNotify here (or cancelling/marking the pending redirect before close) avoids this failover race.
Useful? React with 👍 / 👎.
What problem does this PR solve?
Issue Number: close #1115
Problem Summary:
When a backend is confirmed to fail, we need a way to evict it manually.
What is changed and how it works:
proxy.fail-backend-listandproxy.failover-timeoutconfigfail-backend-listto match by pod name or backend addressCheck List
Tests
Notable changes
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.