cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject [9/9] git commit: Fix NPE during HH when target has been removed from the cluster. Patch by Sam Overton, reviewed by brandonwilliams for CASSANDRA-3677
Date Tue, 07 Feb 2012 20:56:12 GMT
Fix NPE during HH when target has been removed from the cluster.
Patch by Sam Overton, reviewed by brandonwilliams for CASSANDRA-3677


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

Branch: refs/heads/trunk
Commit: 333e7ace0aa939c3c22f21e92b2f937f17d22948
Parents: 5452883
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Feb 7 09:22:44 2012 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Feb 7 09:22:44 2012 -0600

----------------------------------------------------------------------
 .../apache/cassandra/db/HintedHandOffManager.java  |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/333e7ace/src/java/org/apache/cassandra/db/HintedHandOffManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
index a83fbab..e2dc046 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -391,7 +391,9 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
         {
             Token<?> token = StorageService.getPartitioner().getTokenFactory().fromByteArray(row.key.key);
             InetAddress target = StorageService.instance.getTokenMetadata().getEndpoint(token);
-            scheduleHintDelivery(target);
+            // token may have since been removed (in which case we have just read back a
tombstone)
+            if (target != null)
+                scheduleHintDelivery(target);
         }
 
         if (logger_.isDebugEnabled())


Mime
View raw message