Skip to content

2.x: Fix Observable.concatMapSingle dropping upstream items - #5972

Merged
akarnokd merged 1 commit into
ReactiveX:2.xfrom
akarnokd:ConcatMapSingleFix
Apr 24, 2018
Merged

akarnokd merged 1 commit into
ReactiveX:2.xfrom
akarnokd:ConcatMapSingleFix

Conversation

@akarnokd

@akarnokd akarnokd commented Apr 24, 2018 •

Copy link
Copy Markdown
Member

The internal queue of Observable.concatMapSingle was incorrectly the bounded one from its Flowable counterpart, causing it to drop upstream items if the current Single was delayed. The right queue for Observables is the SpscLinkedArrayQueue.

Added unit tests to both concatMapSingle and concatMapMaybe to verify the correct behavior.

Fixes: #5971.

@codecov

codecov Bot commented Apr 24, 2018

Copy link
Copy Markdown

Codecov Report

Merging #5972 into 2.x will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5972      +/-   ##
============================================
+ Coverage     98.24%   98.27%   +0.03%     
+ Complexity     6018     6017       -1     
============================================
  Files           656      656              
  Lines         44037    44037              
  Branches       6100     6100              
============================================
+ Hits          43262    43279      +17     
+ Misses          233      229       -4     
+ Partials        542      529      -13
Impacted Files Coverage Δ Complexity Δ
...nal/operators/mixed/ObservableConcatMapSingle.java 100% <100%> (ø) 3 <0> (ø) ⬇️
.../operators/flowable/FlowableBlockingSubscribe.java 91.89% <0%> (-5.41%) 9% <0%> (-1%)
...va/io/reactivex/internal/queue/SpscArrayQueue.java 97.61% <0%> (-2.39%) 22% <0%> (-1%)
...a/io/reactivex/internal/util/QueueDrainHelper.java 97.22% <0%> (-1.39%) 56% <0%> (-1%)
...ternal/operators/completable/CompletableMerge.java 96.42% <0%> (-1.2%) 2% <0%> (ø)
...ava/io/reactivex/processors/BehaviorProcessor.java 98.2% <0%> (-0.9%) 59% <0%> (-1%)
...perators/single/SingleFlatMapIterableFlowable.java 97.5% <0%> (-0.84%) 2% <0%> (ø)
...ternal/operators/observable/ObservableFlatMap.java 86.58% <0%> (-0.64%) 3% <0%> (ø)
...ernal/operators/flowable/FlowableFlatMapMaybe.java 89.85% <0%> (-0.49%) 2% <0%> (ø)
...x/internal/operators/flowable/FlowablePublish.java 98.72% <0%> (-0.43%) 11% <0%> (ø)
... and 17 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 63877ae...7fd542d. Read the comment docs.

@akarnokd
akarnokd merged commit 05b0d40 into ReactiveX:2.x Apr 24, 2018
@akarnokd
akarnokd deleted the ConcatMapSingleFix branch April 24, 2018 08:06
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