cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1073594 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/db/Table.java
Date Wed, 23 Feb 2011 04:57:00 GMT
Author: jbellis
Date: Wed Feb 23 04:57:00 2011
New Revision: 1073594

URL: http://svn.apache.org/viewvc?rev=1073594&view=rev
Log:
check for memtable flush_after_mins exceededevery 10s
patch by jbellis; reviewed by Peter Schuller for CASSANDRA-2183

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1073594&r1=1073593&r2=1073594&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Feb 23 04:57:00 2011
@@ -19,6 +19,7 @@
  * fix sstable2json large-row pagination (CASSANDRA-2188)
  * fix EOFing on requests for the last bytes in a file (CASSANDRA-2213)
  * fix BRAF performance when seeking to EOF (CASSANDRA-2218)
+ * check for memtable flush_after_mins exceeded every 10s (CASSANDRA-2183)
 
 
 0.7.2

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java?rev=1073594&r1=1073593&r2=1073594&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java Wed Feb 23
04:57:00 2011
@@ -250,13 +250,6 @@ public class Table
             initCf(cfm.cfId, cfm.cfName);
         }
 
-        // check 10x as often as the shortest lifetime, so we can exceed all lifetimes by
10% at most
-        int minCheckMs = Integer.MAX_VALUE;
-        for (ColumnFamilyStore cfs : columnFamilyStores.values())
-        {
-            minCheckMs = Math.min(minCheckMs, cfs.getMemtableFlushAfterMins() * 60 * 1000
/ 10);
-        }
-
         Runnable runnable = new Runnable()
         {
             public void run()
@@ -267,7 +260,7 @@ public class Table
                 }
             }
         };
-        flushTask = StorageService.scheduledTasks.scheduleWithFixedDelay(runnable, minCheckMs,
minCheckMs, TimeUnit.MILLISECONDS);
+        flushTask = StorageService.scheduledTasks.scheduleWithFixedDelay(runnable, 10, 10,
TimeUnit.SECONDS);
     }
 
     public void createReplicationStrategy(KSMetaData ksm) throws ConfigurationException



Mime
View raw message