Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensures onLastAssembly does not break fusion chain #3156

Merged
merged 3 commits into from Aug 16, 2022
Merged

Conversation

OlegDokuka
Copy link
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
Signed-off-by: OlegDokuka <odokuka@vmware.com>
Signed-off-by: OlegDokuka <odokuka@vmware.com>
@simonbasle
Copy link
Member

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

@OlegDokuka
Copy link
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

@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 added 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