You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/09/13 13:19:22 UTC

[2/3] cassandra git commit: ninja fix ScheduledExecutorService spinning CPU consumption with 0 corePoolSize

ninja fix ScheduledExecutorService spinning CPU consumption with 0 corePoolSize


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4b4d69f7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4b4d69f7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4b4d69f7

Branch: refs/heads/trunk
Commit: 4b4d69f7786549f33cfd5f71c34b00fef3d6fc91
Parents: 29c6f1d
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Sun Sep 13 12:05:27 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Sun Sep 13 12:18:52 2015 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/utils/concurrent/Ref.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b4d69f7/src/java/org/apache/cassandra/utils/concurrent/Ref.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Ref.java b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
index 92c1a0c..856c21e 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Ref.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
@@ -317,7 +317,7 @@ public final class Ref<T> implements RefCounted<T>
     private static final Set<GlobalState> globallyExtant = Collections.newSetFromMap(new ConcurrentHashMap<>());
     static final ReferenceQueue<Object> referenceQueue = new ReferenceQueue<>();
     private static final ExecutorService EXEC = Executors.newFixedThreadPool(1, new NamedThreadFactory("Reference-Reaper"));
-    private static final ScheduledExecutorService STRONG_LEAK_DETECTOR = !DEBUG_ENABLED ? null : Executors.newScheduledThreadPool(0, new NamedThreadFactory("Strong-Reference-Leak-Detector"));
+    private static final ScheduledExecutorService STRONG_LEAK_DETECTOR = !DEBUG_ENABLED ? null : Executors.newScheduledThreadPool(1, new NamedThreadFactory("Strong-Reference-Leak-Detector"));
     static
     {
         EXEC.execute(new ReferenceReaper());