Skip to content

ensures onLastAssembly does not break fusion chain#3156

Merged
OlegDokuka merged 3 commits into3.4.xfrom
bugfix/3.4.x-3137
Aug 16, 2022
Merged

ensures onLastAssembly does not break fusion chain#3156
OlegDokuka merged 3 commits into3.4.xfrom
bugfix/3.4.x-3137

Conversation

@OlegDokuka
Copy link
Copy Markdown
Contributor

closes #3137

as it was observed, onLastOperator may add extra operators to the chain. In the case of scalar fusion at flatMap operators ( https://github.com/reactor/reactor-core/blob/main/reactor-core/src/main/java/reactor/core/publisher/FluxFlatMap.java#L118) the inner chain may be fused with the outer downstream. Since onLastOperator must be applied to the inner chain, modification added by the call may break fusion which leads to the ClastCastException

Signed-off-by: OlegDokuka odokuka@vmware.com

Signed-off-by: OlegDokuka <odokuka@vmware.com>
@OlegDokuka OlegDokuka requested a review from a team as a code owner August 16, 2022 10:32
@OlegDokuka OlegDokuka changed the base branch from main to 3.4.x August 16, 2022 10:32
@OlegDokuka OlegDokuka added the type/bug A general bug label Aug 16, 2022
@OlegDokuka OlegDokuka added this to the 3.4.23 milestone Aug 16, 2022
OlegDokuka added 2 commits August 16, 2022 14:42
Signed-off-by: OlegDokuka <odokuka@vmware.com>
Signed-off-by: OlegDokuka <odokuka@vmware.com>
@simonbasle
Copy link
Copy Markdown
Contributor

@OlegDokuka there's 2 usages of onLastAssembly in ParallelFlux, have you reviewed them see if that fix should also apply there ?

@OlegDokuka
Copy link
Copy Markdown
Contributor Author

@OlegDokuka there's 2 usages of onLastAssembly in ParallelFlux, have you reviewed them see if that fix should also apply there ?

Yes, looks like fusión is always off for parallel Flux and already using Hide subscriber

@OlegDokuka OlegDokuka merged commit 7f6f65f into 3.4.x Aug 16, 2022
@reactorbot
Copy link
Copy Markdown

@OlegDokuka this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

OlegDokuka pushed a commit that referenced this pull request Aug 16, 2022
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: OlegDokuka <odokuka@vmware.com>
@chemicL chemicL deleted the bugfix/3.4.x-3137 branch April 11, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClassCastException when using Hooks

3 participants