cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: only query once for local host id on join
Date Tue, 20 May 2014 01:13:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 8abe9f6f5 -> de1f7ee1e


only query once for local host id on join

patch by dbrosius reviewed by jbellis for cassandra-7257


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

Branch: refs/heads/cassandra-1.2
Commit: de1f7ee1eebc0ed9a092940874ac5868b16ef930
Parents: 8abe9f6
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Mon May 19 21:12:44 2014 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Mon May 19 21:12:44 2014 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/StorageService.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/de1f7ee1/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 7cecec9..9a6e67a 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -618,9 +618,10 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         // for bootstrap to get the load info it needs.
         // (we won't be part of the storage ring though until we add a counterId to our state,
below.)
         // Seed the host ID-to-endpoint map with our own ID.
-        getTokenMetadata().updateHostId(SystemTable.getLocalHostId(), FBUtilities.getBroadcastAddress());
+        UUID localHostId = SystemTable.getLocalHostId();
+        getTokenMetadata().updateHostId(localHostId, FBUtilities.getBroadcastAddress());
         appStates.put(ApplicationState.NET_VERSION, valueFactory.networkVersion());
-        appStates.put(ApplicationState.HOST_ID, valueFactory.hostId(SystemTable.getLocalHostId()));
+        appStates.put(ApplicationState.HOST_ID, valueFactory.hostId(localHostId));
         appStates.put(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress()));
         appStates.put(ApplicationState.RELEASE_VERSION, valueFactory.releaseVersion());
         logger.info("Starting up server gossip");


Mime
View raw message