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_r187442479
  
    --- Diff: src/java/org/apache/cassandra/service/reads/DataResolver.java ---
    @@ -64,12 +72,19 @@ public PartitionIterator resolve()
             // at the beginning of this method), so grab the response count once and use
that through the method.
             int count = responses.size();
             List<UnfilteredPartitionIterator> iters = new ArrayList<>(count);
    -        InetAddressAndPort[] sources = new InetAddressAndPort[count];
    +        Replica[] sources = new Replica[count];
             for (int i = 0; i < count; i++)
             {
                 MessageIn<ReadResponse> msg = responses.get(i);
                 iters.add(msg.payload.makeIterator(command));
    -            sources[i] = msg.from;
    +
    +            Replica replica = replicaMap.get(msg.from);
    +            if (replica == null)
    +                replica = command.decorateEndpoint(msg.from);
    +            if (replica == null)
    +                replica = Replica.fullStandin(msg.from);
    +
    +            sources[i] = replica != null ? replica : Replica.fullStandin(msg.from);
    --- End diff --
    
    Seems like you doubled up on the stand in?


---

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


Mime
View raw message