Repository navigation
[ISSUE #8230] Preserve failover with exponential retry backoff. - #8231
Merged
Merged
Conversation
Fixes apache#8230. Completes the exponential routing correction discussed in apache#8088 with real-client and virtual-time regression coverage.
Contributor
|
hi, pls add my wechat: aias00 |
Aias00
approved these changes
Oct 29, 2026
Aias00
left a comment
Contributor
There was a problem hiding this comment.
Reviewed commit 3df2cac. No blocking issues found.
The change preserves the configured failover routing policy while applying exponential backoff, reuses existing upstream reselection, and initializes exclusion state per subscription. CURRENT behavior, GET-only eligibility, backoff/jitter and retry budgets are preserved.
Independent validation:
- On the unmodified base, the real-HTTP regression suite reproduces all four exponential failover errors across Netty/WebClient and HTTP 503/disconnect; the other ten control cases pass. All 14 cases pass on this head.
- The scoped 17-module reactor reports 1,429 tests, zero failures/errors and four skips (Amazon Corretto 21; project target Java 17). This includes 153 HTTP-client, 155 Divide and 21 HTTP-starter tests.
- Checkstyle, the separately executed Apache RAT check and git diff --check pass.
Repository workflows currently report action_required for this first-time contribution. Please authorize the workflows and wait for successful CI before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8230.
With
retryStrategy=failoverandretryBackOffSpec=exponential, a GET connection failure retries the original URI and an upstream 503 receives no retry. A healthy standby is never contacted. Both Netty and WebClient reproduce this with ordinary Divide rules.Changes
No new configuration or dependencies are required.
Prior work
This completes the exponential routing correction proposed by @SouthwestAsiaFloat in closed, unmerged #8088 and highlighted in @Aias00's review. The merged #8076 did not include that part. #7777 fixed the corresponding fixed-backoff case. Canary validation is outside this change's scope.
Validation
shenyu-common. HTTP client: 153 tests, no skips; Divide: 155 tests, no skips; HTTP starter: 21 tests, no skips.git diff --checkpassed. Tests and checks were not disabled.JDK: Temurin 17.0.21+9; base:
a87a3613f5ef1694f0624911002a821ab3587a45. Maven used a workspace-local dependency cache and temporary directory.The loopback tests use real ephemeral servers and consume the full responses. Reactor Netty's implicit connection retry is disabled, so counts measure ShenYu attempts. Both clients contact the failed primary once and the healthy standby once for 503 and disconnect cases. Controls cover CURRENT recovery, zero retries and 4xx forwarding. Full-repository install and Docker E2E were not run.
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.The last item is unchecked because validation used the scoped reactor command above.