Github user bdeggleston commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/224#discussion_r189091062
  
    --- Diff: src/java/org/apache/cassandra/db/ConsistencyLevel.java ---
    @@ -190,50 +197,50 @@ public int 
countLocalEndpoints(Iterable<InetAddressAndPort> liveEndpoints)
              * the blockFor first ones).
              */
             if (isDCLocal)
    -            liveEndpoints.sort(DatabaseDescriptor.getLocalComparator());
    +            liveReplicas.sort(DatabaseDescriptor.getLocalComparator());
     
    -        return liveEndpoints.subList(0, Math.min(liveEndpoints.size(), 
blockFor(keyspace)));
    +        return liveReplicas.subList(0, Math.min(liveReplicas.size(), 
blockFor(keyspace)));
         }
     
    -    private List<InetAddressAndPort> filterForEachQuorum(Keyspace 
keyspace, List<InetAddressAndPort> liveEndpoints)
    +    private ReplicaList filterForEachQuorum(Keyspace keyspace, ReplicaList 
liveReplicas)
         {
             NetworkTopologyStrategy strategy = (NetworkTopologyStrategy) 
keyspace.getReplicationStrategy();
     
    -        Map<String, List<InetAddressAndPort>> dcsEndpoints = new 
HashMap<>();
    +        Map<String, ReplicaList> dcsReplicas = new HashMap<>();
             for (String dc: strategy.getDatacenters())
    -            dcsEndpoints.put(dc, new ArrayList<>());
    +            dcsReplicas.put(dc, new ReplicaList());
    --- End diff --
    
    why not? fixed


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to