Skip to content

2.x: fix SpscLAQ nepotism, FlowableRefCountTest.testRefCountAsync flaky#5507

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:FixSpscLAQNepotism
Jul 20, 2017
Merged

2.x: fix SpscLAQ nepotism, FlowableRefCountTest.testRefCountAsync flaky#5507
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:FixSpscLAQNepotism

Conversation

@akarnokd
Copy link
Member

@akarnokd akarnokd commented Jul 19, 2017

This PR fixes the so-called GC Nepotism (see #3794) in SpscLinkedArrayQueue by not nulling out the previous buffer's next pointer upon switching buffers in the peek()/poll() methods.

In addition, the FlowableRefCountTest.testRefCountAsync has been reworked to be more forgiving towards unexpected delays due to system load (reported in #5506).

@codecov
Copy link

codecov bot commented Jul 19, 2017

Codecov Report

Merging #5507 into 2.x will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5507      +/-   ##
============================================
- Coverage     96.04%   96.02%   -0.03%     
+ Complexity     5808     5797      -11     
============================================
  Files           631      631              
  Lines         41282    41285       +3     
  Branches       5732     5732              
============================================
- Hits          39651    39645       -6     
+ Misses          649      647       -2     
- Partials        982      993      +11
Impacted Files Coverage Δ Complexity Δ
...reactivex/internal/queue/SpscLinkedArrayQueue.java 96.82% <100%> (-0.74%) 38 <1> (-1)
...tivex/internal/schedulers/InstantPeriodicTask.java 61.11% <0%> (-5.56%) 7% <0%> (-2%)
...ternal/operators/flowable/FlowableSampleTimed.java 91.17% <0%> (-4.42%) 3% <0%> (ø)
...activex/internal/operators/single/SingleCache.java 97.05% <0%> (-2.95%) 23% <0%> (-1%)
...rnal/operators/flowable/FlowableTakeLastTimed.java 96.29% <0%> (-2.78%) 2% <0%> (ø)
...java/io/reactivex/subjects/CompletableSubject.java 94.8% <0%> (-2.6%) 35% <0%> (-1%)
...activex/internal/observers/QueueDrainObserver.java 61.53% <0%> (-2.57%) 12% <0%> (-1%)
...main/java/io/reactivex/subjects/SingleSubject.java 97.61% <0%> (-2.39%) 39% <0%> (-1%)
.../main/java/io/reactivex/subjects/MaybeSubject.java 95.65% <0%> (-2.18%) 46% <0%> (-1%)
...activex/internal/schedulers/ExecutorScheduler.java 94.59% <0%> (-2.03%) 9% <0%> (ø)
... and 41 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 09df08a...59568ac. 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