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

Disable fusion in MonoSubscriber #3245

Merged
merged 5 commits into from
Oct 27, 2022

Conversation

UgiR
Copy link
Contributor

@UgiR UgiR commented Oct 23, 2022

Fixes #3239

@UgiR UgiR requested a review from a team as a code owner October 23, 2022 16:10
@@ -58,15 +58,17 @@ public class FluxDoOnEachTest {
void doOnEachAsyncFusionDoesntTriggerOnNextTwice() {
List<String> signals = new ArrayList<>();
StepVerifier.create(Flux.just("a", "b", "c")
.collectList()
.limitRate(3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to arbitrary operator that satisfies .expectFusion(Fuseable.ASYNC)

@UgiR UgiR marked this pull request as draft October 23, 2022 16:41
@UgiR
Copy link
Contributor Author

UgiR commented Oct 23, 2022

Need to fix some tests that depended on certain operators being fuseable

@UgiR UgiR marked this pull request as ready for review October 23, 2022 18:38
@chemicL chemicL merged commit b70f94e into reactor:3.4.x Oct 27, 2022
@reactorbot
Copy link

@chemicL 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 🙇

@chemicL
Copy link
Member

chemicL commented Oct 27, 2022

@UgiR Thank you for the contribution! It was now merged. Would you care to follow up with another that removes mentions of fusion in the comments of MonoSubscriber implementation?

chemicL added a commit that referenced this pull request Oct 27, 2022
@UgiR
Copy link
Contributor Author

UgiR commented Oct 28, 2022

@chemicL Yes will clean this up in the next few days -- must have missed it, thanks!

chemicL pushed a commit that referenced this pull request Oct 31, 2022
simonbasle added a commit to reactor/reactor-addons that referenced this pull request Nov 8, 2022
In reactor-core, `Operators.MonoSubscriber` has stopped implementing
ASYNC fusion as a base. It continues to be compatible with Fuseable
publishers but now by default only negotiates `Fuseable.NONE`.

Some RxJava adapter classes don't really have a way of propagating the
fusion up to RxJava and used to rely on the default ASYNC capability
of MonoSubscriber, testing that `requestFusion` would indeed negotiate
that. Now that it negotiates NONE, said tests fail.

This commit removes the tests and adds a FIXME as a more in depth follow
up to this issue (where we can evaluate if it makes sense to keep the
publishers Fuseable).

See reactor/reactor-core#3245.
simonbasle added a commit to reactor/reactor-addons that referenced this pull request Nov 8, 2022
In reactor-core, `Operators.MonoSubscriber` has stopped implementing
ASYNC fusion as a base. It continues to be compatible with Fuseable
publishers but now by default only negotiates `Fuseable.NONE`.

Some RxJava adapter classes don't really have a way of propagating the
fusion up to RxJava and used to rely on the default ASYNC capability
of MonoSubscriber, testing that `requestFusion` would indeed negotiate
that. Now that it negotiates NONE, said tests fail.

This commit removes the tests and adds a FIXME as a more in depth follow
up to this issue (where we can evaluate if it makes sense to keep the
publishers Fuseable).

Also update to latest 3.4.x core snapshot.

See reactor/reactor-core#3245.
violetagg added a commit to reactor/reactor-kotlin-extensions that referenced this pull request Nov 8, 2022
In reactor-core, `Operators.MonoSubscriber` has stopped implementing
ASYNC fusion as a base. It continues to be compatible with Fuseable
publishers but now by default only negotiates `Fuseable.NONE`.

Some RxJava adapter classes don't really have a way of propagating the
fusion up to RxJava and used to rely on the default ASYNC capability
of MonoSubscriber, testing that `requestFusion` would indeed negotiate
that. Now that it negotiates NONE, said tests fail.

This commit removes the tests and adds a FIXME as a more in depth follow
up to this issue (where we can evaluate if it makes sense to keep the
publishers Fuseable).

Also update to latest 3.4.x core snapshot.

See reactor/reactor-core#3245.
violetagg added a commit to reactor/reactor-kotlin-extensions that referenced this pull request Nov 8, 2022
In reactor-core, `Operators.MonoSubscriber` has stopped implementing
ASYNC fusion as a base. It continues to be compatible with Fuseable
publishers but now by default only negotiates `Fuseable.NONE`.

Some RxJava adapter classes don't really have a way of propagating the
fusion up to RxJava and used to rely on the default ASYNC capability
of MonoSubscriber, testing that `requestFusion` would indeed negotiate
that. Now that it negotiates NONE, said tests fail.

This commit removes the tests and adds a FIXME as a more in depth follow
up to this issue (where we can evaluate if it makes sense to keep the
publishers Fuseable).

Also update to latest 3.4.x core snapshot.

See reactor/reactor-core#3245.
@OlegDokuka OlegDokuka added this to the 3.4.25 milestone Nov 8, 2022
@OlegDokuka OlegDokuka added the type/enhancement A general enhancement label Nov 8, 2022
chemicL pushed a commit that referenced this pull request Mar 7, 2023
Since Mono deals with at most one item, a notion of a queue is not justified. MonoSubscriber supported the notion of async fusion, which requires unnecessary operations to support it. This contributes to a performance degradation instead of improving it. Async fusion has been removed in 3.5.0 line as part of a rework of Mono stack to make them more lazy (compute result after request has been issued, instead of at subscription time). The asynchronous fusion aspect can be also removed as part of the 3.4.x release line to improve performance of existing usages, as it does not change the behaviour nor the APIs.

Fixes #3239
chemicL pushed a commit that referenced this pull request Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants