cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aweisb...@apache.org
Subject [1/6] cassandra git commit: CASSANDRA-13163, fix NPE in StorageService.excise() [Forced Update!]
Date Wed, 03 May 2017 22:07:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 18b77c3e0 -> 6ed913433 (forced update)
  refs/heads/cassandra-3.11 efd3ab121 -> 8b97a91bf (forced update)
  refs/heads/trunk 42655387d -> 2f9de24f0 (forced update)


CASSANDRA-13163, fix NPE in StorageService.excise()

Patch by Ariel Weisberg; Reviewed by Jason Brown for CASSANDRA-13163


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

Branch: refs/heads/cassandra-3.0
Commit: 6ed9134336bb48d04284cefd303d8374ed901c0a
Parents: 617c8eb
Author: Ariel Weisberg <ariel.weisberg@datastax.com>
Authored: Fri Jan 27 17:08:23 2017 -0500
Committer: Ariel Weisberg <aweisberg@apple.com>
Committed: Wed May 3 17:57:24 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ed91343/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9ec6c95..17a11ab 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fix NPE in StorageService.excise() (CASSANDRA-13163)
  * Expire OutboundTcpConnection messages by a single Thread (CASSANDRA-13265)
  * Fail repair if insufficient responses received (CASSANDRA-13397)
  * Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ed91343/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 143b402..9bc046f 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2247,8 +2247,9 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
     {
         logger.info("Removing tokens {} for {}", tokens, endpoint);
 
-        if (tokenMetadata.isMember(endpoint))
-            HintsService.instance.excise(tokenMetadata.getHostId(endpoint));
+        UUID hostId = tokenMetadata.getHostId(endpoint);
+        if (hostId != null && tokenMetadata.isMember(endpoint))
+            HintsService.instance.excise(hostId);
 
         removeEndpoint(endpoint);
         tokenMetadata.removeEndpoint(endpoint);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message