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

    https://github.com/apache/cassandra/pull/224#discussion_r187668202
  
    --- Diff: src/java/org/apache/cassandra/dht/RangeFetchMapCalculator.java ---
    @@ -158,14 +159,15 @@ static boolean isTrivial(Range<Token> range)
                 boolean localDCCheck = true;
                 while (!added)
                 {
    -                List<InetAddressAndPort> srcs = new 
ArrayList<>(rangesWithSources.get(trivialRange));
    +                ReplicaList replicas = new 
ReplicaList(rangesWithSources.get(trivialRange));
                     // sort with the endpoint having the least number of 
streams first:
    -                srcs.sort(Comparator.comparingInt(o -> 
optimisedMap.get(o).size()));
    -                for (InetAddressAndPort src : srcs)
    +                replicas.sort(Comparator.comparingInt(o -> 
optimisedMap.get(o.getEndpoint()).size()));
    +                Replicas.checkFull(replicas);
    +                for (Replica replica : replicas)
                     {
    -                    if (passFilters(src, localDCCheck))
    +                    if (passFilters(replica, localDCCheck))
                         {
    -                        fetchMap.put(src, trivialRange);
    +                        fetchMap.put(replica.getEndpoint(), trivialRange);
    --- End diff --
    
    So this is something I have been running into on my end, but why unwrap 
here?  I have been need to fix that because I need the transientness of what I 
am fetching for to determine whether the remote side is going to send me the 
transient data or the full data.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to