blob: ae5b880f28e2b1d4a33f190e7d1604fe722c9ea5 [file] [log] [blame]
#
# Cheat during the leader election for a counter mutation and favour node 2, 127.0.0.2
#
# Note that this happens only if the node is known to be available.
#
RULE election counter leader cheat
CLASS org.apache.cassandra.service.StorageProxy
METHOD findSuitableEndpoint
AT EXIT
BIND isthere:boolean = $localEndpoints.contains(org.apache.cassandra.locator.InetAddressAndPort.getByName("127.0.0.2"));
if isthere
DO
return org.apache.cassandra.locator.InetAddressAndPort.getByName("127.0.0.2");
ENDRULE