Skip to content

Harden failed-IP cooldown config and add DEFAULT-mode test#2253

Merged
hyperxpro merged 1 commit into
mainfrom
cooldown-fixes
Jul 18, 2026
Merged

Harden failed-IP cooldown config and add DEFAULT-mode test#2253
hyperxpro merged 1 commit into
mainfrom
cooldown-fixes

Conversation

@hyperxpro

Copy link
Copy Markdown
Member

Motivation:

#2221 extended failed-IP cooldown support to all LoadBalance modes and made it configurable, but left three gaps. The end-to-end feedback loop in DEFAULT mode, from markFailed to IP reordering, was never exercised through the client, leaving regressions undetected. The configuration also accepted negative cooldown periods, silently disabling the feature, and enabling the cooldown with a null period in a custom config could cause NettyRequestSender construction to fail with an NPE.

Modification:

Add an end-to-end test that verifies DEFAULT mode deprioritizes a failed IP on subsequent connections using a multi-IP host and fresh connections. Reject negative cooldown periods with IllegalArgumentException while continuing to allow null (reset to the default) and Duration.ZERO. Guard NettyRequestSender against a null cooldown period when the feature is enabled, leaving the cooldown disabled instead of failing client construction.

Result:

The failed-IP cooldown behavior in DEFAULT mode is now covered end-to-end, ensuring regressions are detected. Invalid negative configuration now fails fast, and inconsistent custom configurations no longer cause client construction to fail.

@hyperxpro
hyperxpro merged commit 984d286 into main Jul 18, 2026
17 checks passed
@hyperxpro
hyperxpro deleted the cooldown-fixes branch July 18, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant