You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2010/01/11 20:11:25 UTC

svn commit: r898010 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java

Author: jbellis
Date: Mon Jan 11 19:11:25 2010
New Revision: 898010

URL: http://svn.apache.org/viewvc?rev=898010&view=rev
Log:
the right max queue size for CLES is always the number of writer threads (since they always block for the CL before proceeding).  patch by jbellis

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java?rev=898010&r1=898009&r2=898010&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java Mon Jan 11 19:11:25 2010
@@ -42,7 +42,12 @@
 
     public CommitLogExecutorService()
     {
-        queue = new ArrayBlockingQueue<CheaterFutureTask>(10000);
+        this(DatabaseDescriptor.getConcurrentWriters());    
+    }
+
+    public CommitLogExecutorService(int queueSize)
+    {
+        queue = new ArrayBlockingQueue<CheaterFutureTask>(queueSize);
         Runnable runnable = new WrappedRunnable()
         {
             public void runMayThrow() throws Exception