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

3.x: Fix groupBy not requesting more if a group is cancelled w/ items #6895

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

akarnokd
Copy link
Member

If a group is cancelled with unconsumed item in its buffer, the operator stopped requesting more thus hanging other groups. In 3.x the operator was somewhat strenghtened for this case except one case when the cancellation happens outside the drain loop.

The fix is to invoke drain() from cancel for it to have the cleanup and replenishment happen.

Fixes #6889

@akarnokd akarnokd added this to the 3.0 milestone Jan 29, 2020
@codecov
Copy link

codecov bot commented Jan 29, 2020

Codecov Report

Merging #6895 into 3.x will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #6895      +/-   ##
============================================
+ Coverage     98.25%   98.28%   +0.02%     
- Complexity     6590     6594       +4     
============================================
  Files           740      740              
  Lines         47293    47294       +1     
  Branches       6430     6430              
============================================
+ Hits          46468    46482      +14     
+ Misses          300      295       -5     
+ Partials        525      517       -8
Impacted Files Coverage Δ Complexity Δ
...3/internal/operators/flowable/FlowableGroupBy.java 97.17% <100%> (+1.58%) 3 <0> (ø) ⬇️
...tivex/rxjava3/internal/jdk8/ParallelCollector.java 93.57% <0%> (-4.59%) 2% <0%> (ø)
.../operators/observable/ObservableFlatMapSingle.java 89.68% <0%> (-3.18%) 2% <0%> (ø)
...internal/operators/flowable/FlowableFromArray.java 96.61% <0%> (-1.7%) 3% <0%> (ø)
...ernal/operators/flowable/FlowableFlatMapMaybe.java 93.75% <0%> (-1.57%) 2% <0%> (ø)
...ternal/operators/completable/CompletableMerge.java 95.94% <0%> (-1.36%) 2% <0%> (ø)
...rnal/operators/observable/ObservableObserveOn.java 98.69% <0%> (-1.31%) 3% <0%> (ø)
...ivex/rxjava3/subscribers/SerializedSubscriber.java 98.86% <0%> (-1.14%) 26% <0%> (-1%)
...perators/observable/ObservableMergeWithSingle.java 99.05% <0%> (-0.95%) 2% <0%> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 87.32% <0%> (-0.71%) 2% <0%> (ø)
... and 21 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 f1a795d...5fd4e00. Read the comment docs.

@akarnokd akarnokd merged commit 5f6aafc into ReactiveX:3.x Jan 29, 2020
@akarnokd akarnokd deleted the GroupByReplenishOnCancelFix3x branch September 6, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.x: Unexpected behaviour of GroupBy operator wrt. request handling
2 participants