dcapwell commented on code in PR #2261:
URL: https://github.com/apache/cassandra/pull/2261#discussion_r1164458200
##########
src/java/org/apache/cassandra/service/StorageProxy.java:
##########
@@ -1617,10 +1618,19 @@ private static void sendMessagesToNonlocalDC(Message<?
extends IMutation> messag
target = targets.get(0);
}
+ Tracing.trace("Sending mutation to remote replica {}", target);
MessagingService.instance().sendWriteWithCallback(message, target,
handler);
logger.trace("Sending message to {}@{}", message.id(), target);
}
+ private static Replica pickReplica(EndpointsForToken targets)
+ {
+ EndpointsForToken healthy = targets.filter(r ->
DynamicEndpointSnitch.getSeverity(r.endpoint()) == 0);
Review Comment:
cache would require volatile, where as parsing the string to an int is fixed
cost/memory... so likely better than the volatile.
--
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]