Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/224#discussion_r188446854
--- Diff: src/java/org/apache/cassandra/service/StorageProxy.java ---
@@ -503,12 +498,12 @@ private static void sendCommit(Commit commit,
Iterable<InetAddressAndPort> repli
MessagingService.instance().sendOneWay(message, target);
}
- private static PrepareCallback preparePaxos(Commit toPrepare,
List<InetAddressAndPort> endpoints, int requiredParticipants, ConsistencyLevel
consistencyForPaxos, long queryStartNanoTime)
+ private static PrepareCallback preparePaxos(Commit toPrepare,
ReplicaList replicas, int requiredParticipants, ConsistencyLevel
consistencyForPaxos, long queryStartNanoTime)
throws WriteTimeoutException
{
PrepareCallback callback = new
PrepareCallback(toPrepare.update.partitionKey(), toPrepare.update.metadata(),
requiredParticipants, consistencyForPaxos, queryStartNanoTime);
MessageOut<Commit> message = new
MessageOut<Commit>(MessagingService.Verb.PAXOS_PREPARE, toPrepare,
Commit.serializer);
- for (InetAddressAndPort target : endpoints)
+ for (InetAddressAndPort target : replicas.asEndpoints())
--- End diff --
This is a candidate for manually unwrapping in the loop.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]