Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/224#discussion_r187442385
--- 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)
--- End diff --
It seems like we knew what kind of Replica it was when we sent the message.
The kind of Replica it might be when we get the response could be different?
Probably not given how pending states work.
I just don't get how we could fail to decorate it. That's not right. If we
sent the message eliciting this response then we must have known at the time.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]