cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] git commit: Fix shutdown of binary protocol server
Date Tue, 23 Apr 2013 11:47:12 GMT
Updated Branches:
  refs/heads/trunk 3fe788435 -> 9f3956337


Fix shutdown of binary protocol server

patch by slebresne; reviewed by iamaleksey for CASSANDRA-5507


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

Branch: refs/heads/trunk
Commit: a6edfa56962c55d7a84eea31fe8fec7c29454f83
Parents: 6dc3242
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Apr 23 13:45:35 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Apr 23 13:45:35 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../apache/cassandra/service/StorageService.java   |   12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a6edfa56/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index eff7c49..06da9a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
  * Fix SemanticVersion.isSupportedBy minor/patch handling (CASSANDRA-5496)
  * Don't provide oldCfId for post-1.1 system cfs (CASSANDRA-5490)
  * Fix primary range ignores replication strategy (CASSANDRA-5424)
+ * Fix shutdown of binary protocol server (CASSANDRA-5507)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a6edfa56/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 b7bf6f4..2298315 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -357,6 +357,12 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         return daemon.nativeServer.isRunning();
     }
 
+    private void shutdownClientServers()
+    {
+        stopRPCServer();
+        stopNativeTransport();
+    }
+
     public void stopClient()
     {
         Gossiper.instance.unregister(migrationManager);
@@ -504,7 +510,7 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
                 if (mutationStage.isShutdown())
                     return; // drained already
 
-                stopRPCServer();
+                shutdownClientServers();
                 optionalTasks.shutdown();
                 Gossiper.instance.stop();
 
@@ -2767,7 +2773,7 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         {
             public void run()
             {
-                stopRPCServer();
+                shutdownClientServers();
                 Gossiper.instance.stop();
                 MessagingService.instance().shutdown();
                 StageManager.shutdownNow();
@@ -3352,7 +3358,7 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
             return;
         }
         setMode(Mode.DRAINING, "starting drain process", true);
-        stopRPCServer();
+        shutdownClientServers();
         optionalTasks.shutdown();
         Gossiper.instance.stop();
 


Mime
View raw message