cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdeggleston <...@git.apache.org>
Subject [GitHub] cassandra pull request #224: 14405 replicas
Date Thu, 17 May 2018 21:38:19 GMT
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: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message