Github user bdeggleston commented on a diff in the pull request: https://github.com/apache/cassandra/pull/224#discussion_r189091069 --- 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()); - for (InetAddressAndPort add : liveEndpoints) + for (Replica replica : liveReplicas) { - String dc = DatabaseDescriptor.getEndpointSnitch().getDatacenter(add); - dcsEndpoints.get(dc).add(add); + String dc = DatabaseDescriptor.getEndpointSnitch().getDatacenter(replica); + dcsReplicas.get(dc).add(replica); } - List<InetAddressAndPort> waitSet = new ArrayList<>(); - for (Map.Entry<String, List<InetAddressAndPort>> dcEndpoints : dcsEndpoints.entrySet()) + ReplicaList waitSet = new ReplicaList(); --- End diff -- fixed
--- --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org