Skip to content

2.x: fix window() with time+size emission problems#5213

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:WindowTimeSizeFix
Mar 22, 2017
Merged

2.x: fix window() with time+size emission problems#5213
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:WindowTimeSizeFix

Conversation

@akarnokd
Copy link
Member

The window() operator overload with time and size bound didn't work correctly when some windows were terminated by the timeout and others by the size. This PR fixes:

  • the case when the operator restarts the time windows when the size bound is reached,
  • leaking of the worker,
  • the item counter not reset to zero when the time bound is reached,
  • periodic window bound stopped working after the first window.

Related #5104 (again).

@akarnokd akarnokd force-pushed the WindowTimeSizeFix branch from d3936da to 158cb0d Compare March 22, 2017 12:29
@codecov
Copy link

codecov bot commented Mar 22, 2017

Codecov Report

Merging #5213 into 2.x will increase coverage by 0.09%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##                2.x    #5213      +/-   ##
============================================
+ Coverage     96.02%   96.12%   +0.09%     
- Complexity     5680     5690      +10     
============================================
  Files           621      621              
  Lines         40611    40617       +6     
  Branches       5632     5636       +4     
============================================
+ Hits          38998    39042      +44     
+ Misses          643      623      -20     
+ Partials        970      952      -18
Impacted Files Coverage Δ Complexity Δ
...ternal/operators/flowable/FlowableWindowTimed.java 84.68% <100%> (+1.01%) 4 <0> (ø) ⬇️
...al/operators/observable/ObservableWindowTimed.java 90.71% <100%> (+2.28%) 4 <0> (ø) ⬇️
.../operators/completable/CompletableConcatArray.java 93.75% <0%> (-6.25%) 2% <0%> (ø)
...internal/operators/completable/CompletableAmb.java 94.91% <0%> (-5.09%) 10% <0%> (-1%)
...ternal/operators/completable/CompletableUsing.java 95.23% <0%> (-4.77%) 4% <0%> (ø)
...reactivex/internal/operators/single/SingleAmb.java 96.36% <0%> (-3.64%) 9% <0%> (-1%)
...vex/internal/operators/single/SingleTakeUntil.java 91.8% <0%> (-3.28%) 2% <0%> (ø)
...x/internal/operators/flowable/FlowablePublish.java 93.83% <0%> (-1.77%) 9% <0%> (-1%)
...ternal/operators/observable/ObservablePublish.java 94.73% <0%> (-1.76%) 9% <0%> (-2%)
...al/operators/observable/ObservableSampleTimed.java 96.66% <0%> (-1.67%) 3% <0%> (ø)
... and 39 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 cd91a9f...158cb0d. Read the comment docs.

@akarnokd akarnokd merged commit 0e19566 into ReactiveX:2.x Mar 22, 2017
@akarnokd akarnokd deleted the WindowTimeSizeFix branch March 22, 2017 19:54
mostroverkhov pushed a commit to mostroverkhov/RxJava that referenced this pull request Mar 23, 2017
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.

3 participants