Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/224#discussion_r188447066
--- Diff: src/java/org/apache/cassandra/service/StorageProxy.java ---
@@ -541,12 +536,12 @@ public void run()
return callback;
}
- private static boolean proposePaxos(Commit proposal,
List<InetAddressAndPort> endpoints, int requiredParticipants, boolean
timeoutIfPartial, ConsistencyLevel consistencyLevel, long queryStartNanoTime)
+ private static boolean proposePaxos(Commit proposal, ReplicaList
replicas, int requiredParticipants, boolean timeoutIfPartial, ConsistencyLevel
consistencyLevel, long queryStartNanoTime)
throws WriteTimeoutException
{
- ProposeCallback callback = new ProposeCallback(endpoints.size(),
requiredParticipants, !timeoutIfPartial, consistencyLevel, queryStartNanoTime);
+ ProposeCallback callback = new ProposeCallback(replicas.size(),
requiredParticipants, !timeoutIfPartial, consistencyLevel, queryStartNanoTime);
MessageOut<Commit> message = new
MessageOut<Commit>(MessagingService.Verb.PAXOS_PROPOSE, proposal,
Commit.serializer);
- for (InetAddressAndPort target : endpoints)
+ for (InetAddressAndPort target : replicas.asEndpoints())
--- End diff --
Another candidate for manually unwrapping.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]