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

2.x: fix buffer(time, maxSize) duplicating buffers on time-size race #5427

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

akarnokd
Copy link
Member

The PR fixes both the time+maxSize bound buffer operators of Flowable and Observable. The logic didn't properly mutually exclude the timer action and the onNext action, resulting in probabilistic emission of the same buffer twice.

Reported in #5426.

@akarnokd akarnokd added this to the 2.2 milestone Jun 19, 2017
@codecov
Copy link

codecov bot commented Jun 19, 2017

Codecov Report

Merging #5427 into 2.x will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5427      +/-   ##
============================================
+ Coverage     95.88%   96.05%   +0.16%     
- Complexity     5789     5792       +3     
============================================
  Files           631      631              
  Lines         41297    41291       -6     
  Branches       5742     5742              
============================================
+ Hits          39599    39661      +62     
+ Misses          679      633      -46     
+ Partials       1019      997      -22
Impacted Files Coverage Δ Complexity Δ
...al/operators/observable/ObservableBufferTimed.java 92.19% <100%> (+0.28%) 5 <0> (ø) ⬇️
...ternal/operators/flowable/FlowableBufferTimed.java 90.84% <100%> (-0.1%) 5 <0> (ø)
.../internal/operators/maybe/MaybeTakeUntilMaybe.java 93.87% <0%> (-6.13%) 2% <0%> (ø)
.../operators/flowable/FlowableBlockingSubscribe.java 91.66% <0%> (-5.56%) 9% <0%> (-1%)
...ternal/operators/completable/CompletableUsing.java 95.23% <0%> (-4.77%) 4% <0%> (ø)
...ernal/operators/maybe/MaybeTakeUntilPublisher.java 96% <0%> (-4%) 2% <0%> (ø)
...vex/internal/operators/flowable/FlowableTimer.java 92.85% <0%> (-3.58%) 2% <0%> (ø)
...rnal/operators/flowable/FlowableFlatMapSingle.java 91.3% <0%> (-2.72%) 2% <0%> (ø)
...ava/io/reactivex/internal/util/HalfSerializer.java 97.5% <0%> (-2.5%) 22% <0%> (-1%)
...perators/single/SingleFlatMapIterableFlowable.java 95.83% <0%> (-2.5%) 2% <0%> (ø)
... and 37 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 73a85c1...3634588. Read the comment docs.

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