You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by st...@apache.org on 2016/06/10 20:22:49 UTC

[2/6] cassandra git commit: StorageService shutdown hook should use a volatile variable

StorageService shutdown hook should use a volatile variable

patch by Ed Capriolo; reviewed by Stefania Alborghetti for CASSANDRA-11984


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

Branch: refs/heads/cassandra-3.0
Commit: 1dffa02250c493862f773af9b691a3bf3db6f76d
Parents: 360541f
Author: Edward Capriolo <ed...@gmail.com>
Authored: Fri Jun 10 10:45:57 2016 -0500
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Jun 10 15:16:38 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1dffa022/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ce48994..7ec3ae9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.7
+ * StorageService shutdown hook should use a volatile variable (CASSANDRA-11984)
  * Persist local metadata earlier in startup sequence (CASSANDRA-11742)
  * Run CommitLog tests with different compression settings (CASSANDRA-9039)
  * cqlsh: fix tab completion for case-sensitive identifiers (CASSANDRA-11664)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1dffa022/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 83639e0..6b64664 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -212,7 +212,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
     public volatile VersionedValue.VersionedValueFactory valueFactory = new VersionedValue.VersionedValueFactory(getPartitioner());
 
     private Thread drainOnShutdown = null;
-    private boolean inShutdownHook = false;
+    private volatile boolean inShutdownHook = false;
 
     public static final StorageService instance = new StorageService();