cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [05/11] git commit: Start MeteredFlusher earlier to prevent OOM during CL replay patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-7078
Date Tue, 24 Sep 2013 15:48:12 GMT
Start MeteredFlusher earlier to prevent OOM during CL replay
patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-7078


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

Branch: refs/heads/trunk
Commit: 1b79d6ed4f19752369a0345ae8d611ec107746d5
Parents: bb3ec4c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Sep 24 10:44:20 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Sep 24 10:44:20 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                | 1 +
 src/java/org/apache/cassandra/service/CassandraDaemon.java | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b79d6ed/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ae2ab5e..a5903fa 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.11
+ * Start MeteredFlusher earlier to prevent OOM during CL replay (CASSANDRA-6087)
  * Avoid sending Truncate command to fat clients (CASSANDRA-6088)
  * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
  * Allow where clause conditions to be in parenthesis (CASSANDRA-6037)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b79d6ed/src/java/org/apache/cassandra/service/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index b2fc367..448bb0a 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -297,6 +297,10 @@ public class CassandraDaemon
             logger.warn("Unable to start GCInspector (currently only supported on the Sun
JVM)");
         }
 
+        // MeteredFlusher can block if flush queue fills up, so don't put on scheduledTasks
+        // Start it before commit log, so memtables can flush during commit log replay
+        StorageService.optionalTasks.scheduleWithFixedDelay(new MeteredFlusher(), 1000, 1000,
TimeUnit.MILLISECONDS);
+
         // replay the log if necessary
         try
         {
@@ -335,9 +339,6 @@ public class CassandraDaemon
         };
         StorageService.optionalTasks.schedule(runnable, 5 * 60, TimeUnit.SECONDS);
 
-        // MeteredFlusher can block if flush queue fills up, so don't put on scheduledTasks
-        StorageService.optionalTasks.scheduleWithFixedDelay(new MeteredFlusher(), 1000, 1000,
TimeUnit.MILLISECONDS);
-
         SystemTable.finishStartup();
 
         // start server internals


Mime
View raw message