Skip to content

Conversation

@akarnokd
Copy link
Member

@akarnokd akarnokd commented May 13, 2020

This PR disables the async fusion capability of the groups emitted by Flowable.groupBy as it appears to lead to hangs due to cancellation and/or lack of requests in certain async scenarios.

By disabling fusion, the groups will manage the items they queue and cancellation will (hopefully) properly trigger replenishment requests for the unclaimed items.

This is more of a workaround than a comprehensible fix for the underlying issues. The main problem is that with groupBy and backpressure, each group itself and the items passing through them now count as resources and Reactive Streams can't cope well with items requiring their own lifecycle.

Related: #6982

@akarnokd akarnokd added this to the 3.1 milestone May 13, 2020
@codecov
Copy link

codecov bot commented May 13, 2020

Codecov Report

Merging #6983 into 3.x will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## 3.x #6983 +/- ## ============================================ - Coverage 99.61% 99.55% -0.06%  Complexity 6669 6669 ============================================ Files 742 742 Lines 47270 47267 -3 Branches 6375 6374 -1 ============================================ - Hits 47086 47055 -31  - Misses 60 96 +36  + Partials 124 116 -8 
Impacted Files Coverage Δ Complexity Δ
...3/internal/operators/flowable/FlowableGroupBy.java 84.93% <ø> (-14.17%) 3.00 <0.00> (ø)
...tivex/rxjava3/disposables/CompositeDisposable.java 98.14% <0.00%> (-1.86%) 39.00% <0.00%> (-1.00%)
...nternal/operators/observable/ObservableCreate.java 97.43% <0.00%> (-1.71%) 2.00% <0.00%> (ø%)
...perators/observable/ObservableMergeWithSingle.java 99.05% <0.00%> (-0.95%) 2.00% <0.00%> (ø%)
...operators/observable/ObservableMergeWithMaybe.java 99.09% <0.00%> (-0.91%) 2.00% <0.00%> (ø%)
.../operators/observable/ObservableFlatMapSingle.java 96.82% <0.00%> (-0.80%) 2.00% <0.00%> (ø%)
...activex/rxjava3/processors/MulticastProcessor.java 99.54% <0.00%> (-0.46%) 82.00% <0.00%> (-1.00%)
...operators/flowable/FlowableConcatMapScheduler.java 99.60% <0.00%> (+0.39%) 4.00% <0.00%> (ø%)
.../operators/observable/ObservableCombineLatest.java 100.00% <0.00%> (+0.61%) 6.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 5c26064...991b092. Read the comment docs.

@akarnokd akarnokd merged commit 125bd05 into ReactiveX:3.x May 15, 2020
@akarnokd akarnokd deleted the GroupByDisableFusion branch May 15, 2020 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants