cassandra-pr mailing list archives

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


Mime
View raw message