cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject git commit: lookup hints by ID, not token
Date Thu, 28 Jun 2012 21:18:38 GMT
Updated Branches:
  refs/heads/trunk 0c7833bd3 -> 7cb3b7395


lookup hints by ID, not token

Patch by Sam Overton; reviewed by eevans for CASSANDRA-4389


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

Branch: refs/heads/trunk
Commit: 7cb3b73950565a400de45e4c9a87557ddb272074
Parents: 0c7833b
Author: Eric Evans <eevans@apache.org>
Authored: Thu Jun 28 16:18:47 2012 -0500
Committer: Eric Evans <eevans@apache.org>
Committed: Thu Jun 28 16:18:47 2012 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cb3b739/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 9152dd6..e880e43 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -404,8 +404,8 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
         List<Row> rows = hintStore.getRangeSlice(null, range, Integer.MAX_VALUE, filter,
null);
         for (Row row : rows)
         {
-            Token<?> token = StorageService.getPartitioner().getTokenFactory().fromByteArray(row.key.key);
-            InetAddress target = StorageService.instance.getTokenMetadata().getEndpoint(token);
+            UUID hostId = UUIDGen.getUUID(row.key.key);
+            InetAddress target = StorageService.instance.getTokenMetadata().getEndpointForHostId(hostId);
             // token may have since been removed (in which case we have just read back a
tombstone)
             if (target != null)
                 scheduleHintDelivery(target);


Mime
View raw message