dcapwell commented on code in PR #1773:
URL: https://github.com/apache/cassandra/pull/1773#discussion_r940886058
##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -1855,14 +1855,23 @@ public Collection<InetAddressAndPort>
prepareForBootstrap(long schemaTimeoutMill
}
// check for operator errors...
+ long nanoDelay = MILLISECONDS.toNanos(ringTimeoutMillis);
for (Token token : bootstrapTokens)
{
InetAddressAndPort existing =
tokenMetadata.getEndpoint(token);
if (existing != null)
{
- long nanoDelay = ringTimeoutMillis * 1000000L;
- if
(Gossiper.instance.getEndpointStateForEndpoint(existing).getUpdateTimestamp() >
(nanoTime() - nanoDelay))
+ EndpointState endpointStateForExisting =
Gossiper.instance.getEndpointStateForEndpoint(existing);
+ long updateTimestamp =
endpointStateForExisting.getUpdateTimestamp();
+ long allowedDelay = nanoTime() - nanoDelay;
+
+ // if the node was updated within the ring delay or
the node is alive, we should fail
+ if (updateTimestamp > allowedDelay ||
endpointStateForExisting.isAlive())
+ {
+ logger.error("Unable to replace node for token={}.
The node is reporting as {}alive with updateTimestamp={} which exceeds the
allowedDelay={}",
Review Comment:
spoke in slack `Unable to replace node for token={}. The node is reporting
as {}alive with updateTimestamp={}, allowedDelay={}"` works for me!
--
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]