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 group emission in some cases #6664

Merged
merged 2 commits into from
Oct 5, 2019

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Oct 4, 2019

This PR fixes two issues:

  • when the Observable.groupBy operator would abandon a newly created group before the group's only item was emitted, causing dataloss.
  • when the groupBy's value selector failed for a new group, thus the new group would never be emitted and report the failure.

It should fix the first test failure of #6663 but may not be the cause for the second.

@akarnokd akarnokd added this to the 3.0 milestone Oct 4, 2019
@codecov
Copy link

codecov bot commented Oct 4, 2019

Codecov Report

Merging #6664 into 3.x will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #6664      +/-   ##
============================================
- Coverage     98.12%   98.11%   -0.01%     
  Complexity     6188     6188              
============================================
  Files           677      677              
  Lines         44674    44682       +8     
  Branches       6166     6169       +3     
============================================
+ Hits          43835    43840       +5     
- Misses          296      299       +3     
  Partials        543      543
Impacted Files Coverage Δ Complexity Δ
...3/internal/operators/flowable/FlowableGroupBy.java 95.5% <100%> (-0.24%) 3 <0> (ø)
...ternal/operators/observable/ObservableGroupBy.java 95.62% <100%> (+0.68%) 2 <0> (ø) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 88.09% <0%> (-6.35%) 2% <0%> (ø)
.../operators/flowable/FlowableBlockingSubscribe.java 93.02% <0%> (-4.66%) 10% <0%> (-1%)
.../internal/disposables/ListCompositeDisposable.java 98% <0%> (-2%) 34% <0%> (-1%)
...nternal/operators/observable/ObservableCreate.java 95.72% <0%> (-1.71%) 2% <0%> (ø)
...internal/operators/flowable/FlowableSwitchMap.java 94.39% <0%> (-1.41%) 3% <0%> (ø)
...a3/internal/operators/flowable/FlowableCreate.java 96.11% <0%> (-1.3%) 6% <0%> (ø)
...perators/observable/ObservableMergeWithSingle.java 99.05% <0%> (-0.95%) 2% <0%> (ø)
...l/operators/observable/ObservableTimeoutTimed.java 99.15% <0%> (-0.85%) 3% <0%> (ø)
... and 18 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 877702e...122345f. Read the comment docs.

@akarnokd akarnokd merged commit cb7ff83 into ReactiveX:3.x Oct 5, 2019
@akarnokd akarnokd deleted the GroupByAbandonFix3x branch October 5, 2019 16:12
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 participants