cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r896139 - in /incubator/cassandra/branches/cassandra-0.5: CHANGES.txt conf/storage-conf.xml src/java/org/apache/cassandra/db/CommitLog.java
Date Tue, 05 Jan 2010 17:26:52 GMT
Author: jbellis
Date: Tue Jan  5 17:26:51 2010
New Revision: 896139

URL: http://svn.apache.org/viewvc?rev=896139&view=rev
Log:
increase default sync period, and wait for last sync to finish before submitting another.
 patch by jbellis; reviewed by Brandon Williams for CASSANDRA-668

Modified:
    incubator/cassandra/branches/cassandra-0.5/CHANGES.txt
    incubator/cassandra/branches/cassandra-0.5/conf/storage-conf.xml
    incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/db/CommitLog.java

Modified: incubator/cassandra/branches/cassandra-0.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/CHANGES.txt?rev=896139&r1=896138&r2=896139&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/CHANGES.txt (original)
+++ incubator/cassandra/branches/cassandra-0.5/CHANGES.txt Tue Jan  5 17:26:51 2010
@@ -5,6 +5,8 @@
    giving the false indication they were being used. (CASSANDRA-651)
  * Avoid redundant write of the same mutation. (CASSANDRA-662)
  * Abort bootstrap if IP is already in the token ring (CASSANDRA-663)
+ * increase default commitlog sync period, and wait for last sync to 
+   finish before submitting another (CASSANDRA-668)
 
 
 0.5.0 RC1

Modified: incubator/cassandra/branches/cassandra-0.5/conf/storage-conf.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/conf/storage-conf.xml?rev=896139&r1=896138&r2=896139&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/conf/storage-conf.xml (original)
+++ incubator/cassandra/branches/cassandra-0.5/conf/storage-conf.xml Tue Jan  5 17:26:51 2010
@@ -304,11 +304,10 @@
   <CommitLogSync>periodic</CommitLogSync>
   <!--
    ~ Interval at which to perform syncs of the CommitLog in periodic mode.
-   ~ Usually the default of 1000ms is fine; increase it only if the
-   ~ CommitLog PendingTasks backlog in jmx shows that you are frequently
-   ~ scheduling a second sync while the first has not yet been processed.
+   ~ Usually the default of 10000ms is fine; increase it if your i/o
+   ~ load is such that syncs are taking excessively long times.
   -->
-  <CommitLogSyncPeriodInMS>1000</CommitLogSyncPeriodInMS>
+  <CommitLogSyncPeriodInMS>10000</CommitLogSyncPeriodInMS>
   <!--
    ~ Delay (in milliseconds) during which additional commit log entries
    ~ may be written before fsync in batch mode.  This will increase

Modified: incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/db/CommitLog.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/db/CommitLog.java?rev=896139&r1=896138&r2=896139&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/db/CommitLog.java
(original)
+++ incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/db/CommitLog.java
Tue Jan  5 17:26:51 2010
@@ -209,15 +209,19 @@
                 {
                     while (true)
                     {
-                        executor.submit(syncer);
                         try
                         {
+                            executor.submit(syncer).get();
                             Thread.sleep(DatabaseDescriptor.getCommitLogSyncPeriod());
                         }
                         catch (InterruptedException e)
                         {
                             throw new RuntimeException(e);
                         }
+                        catch (ExecutionException e)
+                        {
+                            throw new RuntimeException(e);
+                        }
                     }
                 }
             }, "PERIODIC-COMMIT-LOG-SYNCER").start();



Mime
View raw message