Author: adulceanu
Date: Wed Feb 14 06:59:50 2018
New Revision: 1824200

URL: http://svn.apache.org/viewvc?rev=1824200&view=rev
Log:
OAK-7262 - LockBasedScheduler#getHeadNodeState poor performance due to lock 
contention in commitTimeHistogram implementation
Replaced SlidingWindowReservoir with UniformReservoir

Modified:
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/scheduler/LockBasedScheduler.java

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/scheduler/LockBasedScheduler.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/scheduler/LockBasedScheduler.java?rev=1824200&r1=1824199&r2=1824200&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/scheduler/LockBasedScheduler.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/scheduler/LockBasedScheduler.java
 Wed Feb 14 06:59:50 2018
@@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
 import com.codahale.metrics.Histogram;
-import com.codahale.metrics.SlidingWindowReservoir;
+import com.codahale.metrics.UniformReservoir;
 import javax.annotation.Nonnull;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
@@ -155,7 +155,7 @@ public class LockBasedScheduler implemen
 
     private final SegmentNodeStoreStats stats;
     
-    private final Histogram commitTimeHistogram = new Histogram(new 
SlidingWindowReservoir(1000));
+    private final Histogram commitTimeHistogram = new Histogram(new 
UniformReservoir());
     
     private final Random random = new Random();
 


Reply via email to