cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/9] git commit: Start MeteredFlusher earlier to prevent OOM during CL replay patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-7078
Date Wed, 25 Sep 2013 01:51:32 GMT
Updated Branches:
  refs/heads/cassandra-1.2 546485310 -> 16f19a7cc
  refs/heads/cassandra-2.0 07638f41a -> a06a13838
  refs/heads/trunk 2fea9fab0 -> 3a9120bbd


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/54648531
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/54648531
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/54648531

Branch: refs/heads/cassandra-2.0
Commit: 546485310e20dd2c6c67f863cba4b5acd1bae586
Parents: fa8d923
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:47:08 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/54648531/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/54648531/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