cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Shutdown batchlog executor in SS#drain()
Date Fri, 11 Apr 2014 17:57:34 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 d41c07572 -> fe94e90f4


Shutdown batchlog executor in SS#drain()

patch by Sergio Bossa; reviewed by Aleksey Yeschenko for CASSANDRA-7025


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

Branch: refs/heads/cassandra-1.2
Commit: fe94e90f4bd9274a0f0ab10616de2215da8d6b17
Parents: d41c075
Author: Sergio Bossa <sergio.bossa@gmail.com>
Authored: Fri Apr 11 15:45:53 2014 +0100
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Apr 11 20:50:50 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                               | 1 +
 src/java/org/apache/cassandra/db/BatchlogManager.java     | 2 +-
 src/java/org/apache/cassandra/service/StorageService.java | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe94e90f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b3e5310..07c09cf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,7 @@
  * Continue assassinating even if the endpoint vanishes (CASSANDRA-6787)
  * Schedule schema pulls on change (CASSANDRA-6971)
  * Non-droppable verbs shouldn't be dropped from OTC (CASSANDRA-6980)
+ * Shutdown batchlog executor in SS#drain() (CASSANDRA-7025)
 
 
 1.2.16

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe94e90f/src/java/org/apache/cassandra/db/BatchlogManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/BatchlogManager.java b/src/java/org/apache/cassandra/db/BatchlogManager.java
index 7bfbf0c..b8dbadd 100644
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@ -77,7 +77,7 @@ public class BatchlogManager implements BatchlogManagerMBean
     private final AtomicLong totalBatchesReplayed = new AtomicLong();
     private final AtomicBoolean isReplaying = new AtomicBoolean();
 
-    private static final ScheduledExecutorService batchlogTasks = new DebuggableScheduledThreadPoolExecutor("BatchlogTasks");
+    public static final ScheduledExecutorService batchlogTasks = new DebuggableScheduledThreadPoolExecutor("BatchlogTasks");
 
     public void start()
     {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe94e90f/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index a7541f4..1e7bed4 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3499,6 +3499,9 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         }
         FBUtilities.waitOnFutures(flushes);
 
+        BatchlogManager.batchlogTasks.shutdown();
+        BatchlogManager.batchlogTasks.awaitTermination(60, TimeUnit.SECONDS);
+
         ColumnFamilyStore.postFlushExecutor.shutdown();
         ColumnFamilyStore.postFlushExecutor.awaitTermination(60, TimeUnit.SECONDS);
 


Mime
View raw message