-
Notifications
You must be signed in to change notification settings - Fork 128
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
Cannot invoke "MultiSubscriber.onCompletion()" because "this.downstream" is null #705
Comments
From the Zulip conversation, the stack trace was:
|
I need to reproduce this in a pure Mutiny test, but it's likely due to cancellation being tracked through both the upstream subscription and the cancellation request, depending where we are in the code. |
It's indeed what I thought, given this reproducer: AssertSubscriber<List<Integer>> sub = AssertSubscriber.create();
AtomicInteger counter = new AtomicInteger();
Multi.createFrom().range(1, 1000)
.emitOn(Infrastructure.getDefaultExecutor())
.group().intoLists().of(100)
.onItem().invoke(() -> {
if (counter.incrementAndGet() == 9) {
sub.cancel();
}
})
.runSubscriptionOn(Infrastructure.getDefaultExecutor())
.subscribe().withSubscriber(sub);
sub.request(Long.MAX_VALUE);
await().atMost(5, TimeUnit.SECONDS).untilAtomic(counter, equalTo(9)); I get a similar stack trace that confirms my intuition:
|
We used to have an interpretation of the RS TCK that it had to be null on cancellation to release the subscriber. It's actually not necessary (and NPE-prone) since operators are instantiated per-subscription, so the *publisher* does not actually keep references on cancelled subscribers. Fixes #705
@indalaterre May I ask you to build locally the code in #712? It should look something like:
Then in your Maven project you should manually add Mutiny as: <groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
<version>999-SNAPSHOT</version> 🙏 |
We used to have an interpretation of the RS TCK that it had to be null on cancellation to release the subscriber. It's actually not necessary (and NPE-prone) since operators are instantiated per-subscription, so the *publisher* does not actually keep references on cancelled subscribers. Fixes #705
We used to have an interpretation of the RS TCK that it had to be null on cancellation to release the subscriber. It's actually not necessary (and NPE-prone) since operators are instantiated per-subscription, so the *publisher* does not actually keep references on cancelled subscribers. Fixes #705
Yeah!! Perfect it works 🥳 |
Great! |
Hello, I upgraded Quarkus version from 1.12.2.Final to 2.3.0.Final (Mutiny 1.0.0) and now I'm getting a NPE when executing this Mutiny stream.
This happens equally if I use
transformToUniAndConcatenate
orcall
operatorsImplementation of
search
from ElasticsearchImplementation of
getPrice
to MongoDBThe text was updated successfully, but these errors were encountered: