You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2020/08/24 07:29:58 UTC
[cassandra] branch cassandra-3.0 updated: Fix gossip shutdown order
This is an automated email from the ASF dual-hosted git repository.
marcuse pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
new acbaeb1 Fix gossip shutdown order
acbaeb1 is described below
commit acbaeb1ee8d0aabe9ffb198df76fb6839b23f072
Author: Jeff Jirsa <jj...@apple.com>
AuthorDate: Fri May 15 16:29:45 2020 -0700
Fix gossip shutdown order
Patch by Jeff Jirsa; reviewed by Robert Stupp and marcuse for CASSANDRA-15816
---
CHANGES.txt | 1 +
.../org/apache/cassandra/service/StorageService.java | 16 +++++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 2d66ee2..5b23245 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0.22:
+ * Fix gossip shutdown order (CASSANDRA-15816)
* Remove broken 'defrag-on-read' optimization (CASSANDRA-15432)
* Check for endpoint collision with hibernating nodes (CASSANDRA-14599)
* Operational improvements and hardening for replica filtering protection (CASSANDRA-15907)
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index f0b183d..0aba23c 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -315,6 +315,12 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
if (initialized)
{
logger.warn("Stopping gossip by operator request");
+
+ if (isNativeTransportRunning())
+ {
+ logger.warn("Disabling gossip while native transport is still active is unsafe");
+ }
+
Gossiper.instance.stop();
initialized = false;
}
@@ -461,11 +467,6 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
public void stopTransports()
{
- if (isInitialized())
- {
- logger.error("Stopping gossiper");
- stopGossiping();
- }
if (isRPCServerRunning())
{
logger.error("Stopping RPC server");
@@ -476,6 +477,11 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
logger.error("Stopping native transport");
stopNativeTransport();
}
+ if (isInitialized())
+ {
+ logger.error("Stopping gossiper");
+ stopGossiping();
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org