Github user bdeggleston commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/224#discussion_r189109427
--- Diff:
src/java/org/apache/cassandra/service/AbstractWriteResponseHandler.java ---
@@ -225,7 +223,7 @@ protected boolean waitingFor(InetAddressAndPort from)
public void assureSufficientLiveNodes() throws UnavailableException
{
- consistencyLevel.assureSufficientLiveNodes(keyspace,
Iterables.filter(Iterables.concat(naturalEndpoints, pendingEndpoints),
isAlive));
+ consistencyLevel.assureSufficientLiveNodes(keyspace,
Replicas.filter(Replicas.concatNaturalAndPending(naturalReplicas,
pendingReplicas), isReplicaAlive));
--- End diff --
I don't think we're actually allocating any more objects than we were
before. Both `filter` and `concat`/`concatNaturalAndPending` each allocate a
single iterable/replicas warpper, and don't copy anything.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]