Github user jasobrown commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/184#discussion_r160490410
--- Diff: src/java/org/apache/cassandra/gms/Gossiper.java ---
@@ -319,14 +323,25 @@ public long getEndpointDowntime(InetAddress ep)
return 0L;
}
- private boolean isShutdown(InetAddress endpoint)
+ private boolean isShutdown(InetAddressAndPort endpoint)
{
EndpointState epState = endpointStateMap.get(endpoint);
if (epState == null)
+ {
return false;
- if (epState.getApplicationState(ApplicationState.STATUS) == null)
+ }
+
+ VersionedValue versionedValue =
epState.getApplicationState(ApplicationState.STATUS_WITH_PORT);
+ if (versionedValue == null)
+ {
+ versionedValue =
epState.getApplicationState(ApplicationState.STATUS);
+ }
+ if (versionedValue == null)
--- End diff --
this null check can be moved into the block right above, that way it's a
bit easier to read/reason about.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]