Skip to content

Fix flatMap request accounting for resumed errors - #4307

Open
goutamadwant wants to merge 1 commit into
reactor:mainfrom
goutamadwant:4290-flatmap-onerrorcontinue-accounting
Open

Fix flatMap request accounting for resumed errors#4307
goutamadwant wants to merge 1 commit into
reactor:mainfrom
goutamadwant:4290-flatmap-onerrorcontinue-accounting

Conversation

@goutamadwant

Copy link
Copy Markdown

Fix details

Flux.flatMap no longer over-requests from upstream when a Callable inner source throws and the error is resumed by onErrorContinue.

The Callable error path now accounts for the skipped source value once through the common post-error bookkeeping path, while preserving delayed-error behavior for errors that are not resumed. The regression test verifies that two resumed Callable failures do not trigger early upstream replenishment.

Tests:

  • ./gradlew :reactor-core:test --tests reactor.core.publisher.FluxFlatMapTest --tests reactor.core.publisher.OnNextFailureStrategyTest --max-workers=2 --no-build-cache --rerun-tasks
  • ./gradlew spotlessCheck --max-workers=2 --no-build-cache

Fixes #4290.

Signed-off-by: Goutam Adwant <workwithgoutam@gmail.com>
@goutamadwant
goutamadwant requested a review from a team as a code owner July 1, 2026 06:14
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.

flatMap double-counts produced when onErrorContinue resumes a Callable error

1 participant