cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [02/10] cassandra git commit: Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor.
Date Tue, 23 Aug 2016 10:33:42 GMT
Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic
executor.

Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-12251


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

Branch: refs/heads/cassandra-3.0
Commit: 465bb5d45ccef337382592127e214a0ca16a3d88
Parents: 93ad056
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Authored: Mon Aug 1 09:50:33 2016 +0200
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Aug 23 13:31:16 2016 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 src/java/org/apache/cassandra/service/MigrationManager.java | 2 +-
 src/java/org/apache/cassandra/service/StorageService.java   | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/465bb5d4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d28e419..a3a34c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic
executor (CASSANDRA-12251)
  * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701)
  * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357)
  * Update StorageProxy range metrics for timeouts, failures and unavailables (CASSANDRA-9507)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/465bb5d4/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java
index f7a2a48..4cb5ed7 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -129,7 +129,7 @@ public class MigrationManager
                     submitMigrationTask(endpoint);
                 }
             };
-            ScheduledExecutors.optionalTasks.schedule(runnable, MIGRATION_DELAY_IN_MS, TimeUnit.MILLISECONDS);
+            ScheduledExecutors.nonPeriodicTasks.schedule(runnable, MIGRATION_DELAY_IN_MS,
TimeUnit.MILLISECONDS);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/465bb5d4/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 3148f5e..e8ab54e 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3903,8 +3903,6 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         // there are no segments to replay, so we force the recycling of any remaining (should
be at most one)
         CommitLog.instance.forceRecycleAllSegments();
 
-        ColumnFamilyStore.shutdownPostFlushExecutor();
-
         CommitLog.instance.shutdownBlocking();
 
         // wait for miscellaneous tasks like sstable and commitlog segment deletion
@@ -3912,6 +3910,8 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         if (!ScheduledExecutors.nonPeriodicTasks.awaitTermination(1, TimeUnit.MINUTES))
             logger.warn("Miscellaneous task executor still busy after one minute; proceeding
with shutdown");
 
+        ColumnFamilyStore.shutdownPostFlushExecutor();
+
         setMode(Mode.DRAINED, true);
     }
 


Mime
View raw message