cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/3] git commit: Avoid throwing AE when hosts don't have a hostId Patch by brandonwilliams, reviewed by iamaleksey for CASSANDRA-5197
Date Wed, 13 Feb 2013 23:01:04 GMT
Avoid throwing AE when hosts don't have a hostId
Patch by brandonwilliams, reviewed by iamaleksey for CASSANDRA-5197


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

Branch: refs/heads/trunk
Commit: 828572acdb5bff31f58362425b0c80ce6d606bf8
Parents: 2659640
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Feb 13 16:59:41 2013 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Feb 13 16:59:41 2013 -0600

----------------------------------------------------------------------
 .../apache/cassandra/service/StorageService.java   |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/828572ac/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 0f3a331..8c1d053 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -450,7 +450,8 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
                 else
                 {
                     tokenMetadata.updateNormalTokens(loadedTokens.get(ep), ep);
-                    tokenMetadata.updateHostId(loadedHostIds.get(ep), ep);
+                    if (loadedHostIds.containsKey(ep))
+                        tokenMetadata.updateHostId(loadedHostIds.get(ep), ep);
                     Gossiper.instance.addSavedEndpoint(ep);
                 }
             }


Mime
View raw message