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

1.x: throttleFirst detecting clock-drift backwards to open the gate #5123

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

akarnokd
Copy link
Member

If the current time moves backwards before the time the gate was closed, the opening of the gate would happen way later. Since we don't know how much relative time has passed, this fix opens the gate when the drift is detected during onNext.

Reported in #5120.

/cc @davidmoten as you've been experimenting with time-only (that is non-scheduled) gating.

@codecov-io
Copy link

Codecov Report

Merging #5123 into 1.x will increase coverage by 0.02%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##                1.x    #5123      +/-   ##
============================================
+ Coverage     84.38%   84.41%   +0.02%     
- Complexity     2876     2877       +1     
============================================
  Files           290      290              
  Lines         18070    18070              
  Branches       2468     2468              
============================================
+ Hits          15249    15254       +5     
- Misses         1951     1954       +3     
+ Partials        870      862       -8
Impacted Files Coverage Δ Complexity Δ
...a/rx/internal/operators/OperatorThrottleFirst.java 100% <100%> (ø) 2 <ø> (ø)
...ain/java/rx/internal/operators/OnSubscribeAmb.java 79.13% <ø> (-5.04%) 13% <ø> (ø)
...va/rx/internal/schedulers/EventLoopsScheduler.java 84.84% <ø> (-3.04%) 7% <ø> (ø)
...n/java/rx/subjects/SubjectSubscriptionManager.java 80.71% <ø> (-1.43%) 15% <ø> (-1%)
...n/java/rx/internal/operators/CachedObservable.java 84.23% <ø> (+0.54%) 6% <ø> (ø)
...main/java/rx/internal/operators/OperatorMerge.java 87.06% <ø> (+0.69%) 7% <ø> (ø)
...ava/rx/internal/util/BackpressureDrainManager.java 67.9% <ø> (+1.23%) 21% <ø> (+1%)
...rx/internal/operators/OnSubscribeFromIterable.java 93.9% <ø> (+2.43%) 5% <ø> (ø)
.../rx/internal/schedulers/CachedThreadScheduler.java 90.29% <ø> (+2.91%) 6% <ø> (ø)
...ain/java/rx/internal/schedulers/SchedulerWhen.java 87.83% <ø> (+4.05%) 4% <ø> (ø)
... and 2 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 5468972...8c27da2. Read the comment docs.

@akarnokd akarnokd merged commit e8b6035 into ReactiveX:1.x Feb 22, 2017
@akarnokd akarnokd deleted the ThrottleFirstNowDriftFix branch March 24, 2017 13:14
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.

4 participants