smiklosovic commented on code in PR #2215:
URL: https://github.com/apache/cassandra/pull/2215#discussion_r1138357000


##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -1980,12 +1980,14 @@ public Map<String, String> getTokenToEndpointMap()
 
     public String getLocalHostId()
     {
-        return 
getTokenMetadata().getHostId(FBUtilities.getBroadcastAddress()).toString();
+        UUID id = getLocalHostUUID();
+        return id != null ? id.toString() : null;
     }
 
     public UUID getLocalHostUUID()
     {
-        return getTokenMetadata().getHostId(FBUtilities.getBroadcastAddress());
+        UUID id = 
getTokenMetadata().getHostId(FBUtilities.getBroadcastAddress());

Review Comment:
   what is the probability that id returned by TokenMetadata and id returned by 
looking at disk would be different?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to