Skip to content

Conversation

@akarnokd
Copy link
Member

@akarnokd akarnokd commented Nov 30, 2020

Following up on a Gitter.im report, the onComplete/onError methods of the using operators were calling cancel/dispose on the upstream even though there is no reason to do such a thing and is also not allowed by Reactive Streams rule 2.3.

The original code's side-effect was that given a nested using pair, an onComplete/onError of the inner sequence would trigger a cancellation and resource release in the outer before/while the onComplete/onError signals propagate downstream and return back on a non-eager setting.

@akarnokd akarnokd added this to the 3.1 milestone Nov 30, 2020
@codecov
Copy link

codecov bot commented Nov 30, 2020

Codecov Report

Merging #7121 (0f4523e) into 3.x (3d5fece) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## 3.x #7121 +/- ## ============================================ + Coverage 99.49% 99.53% +0.04%  + Complexity 6670 6669 -1  ============================================ Files 742 742 Lines 47275 47267 -8 Branches 6374 6374 ============================================ + Hits 47037 47048 +11  + Misses 112 100 -12  + Partials 126 119 -7 
Impacted Files Coverage Δ Complexity Δ
...va3/internal/operators/flowable/FlowableUsing.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...internal/operators/observable/ObservableUsing.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 92.25% <0.00%> (-4.93%) 2.00% <0.00%> (ø%)
...vex/rxjava3/internal/operators/maybe/MaybeAmb.java 96.96% <0.00%> (-3.04%) 10.00% <0.00%> (-1.00%)
...l/operators/observable/ObservableTimeoutTimed.java 99.15% <0.00%> (-0.85%) 3.00% <0.00%> (ø%)
.../operators/observable/ObservableCombineLatest.java 99.38% <0.00%> (-0.62%) 6.00% <0.00%> (ø%)
...a/io/reactivex/rxjava3/subjects/ReplaySubject.java 98.75% <0.00%> (-0.42%) 49.00% <0.00%> (ø%)
...ternal/operators/observable/ObservableFlatMap.java 97.87% <0.00%> (-0.36%) 3.00% <0.00%> (ø%)
...java3/internal/operators/flowable/FlowableZip.java 100.00% <0.00%> (+1.02%) 6.00% <0.00%> (ø%)
...ernal/operators/flowable/FlowableFromIterable.java 100.00% <0.00%> (+1.04%) 5.00% <0.00%> (ø%)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d5fece...0f4523e. Read the comment docs.

@akarnokd akarnokd merged commit bfd242d into ReactiveX:3.x Nov 30, 2020
@akarnokd akarnokd deleted the UsingTerminationFix3x branch September 6, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants