smiklosovic commented on code in PR #2981:
URL: https://github.com/apache/cassandra/pull/2981#discussion_r1481484692


##########
src/java/org/apache/cassandra/locator/ReplicaPlans.java:
##########
@@ -463,7 +455,7 @@ E select(ConsistencyLevel consistencyLevel, L liveAndDown, 
L live)
                     int add = 
consistencyLevel.blockForWrite(liveAndDown.replicationStrategy(), 
liveAndDown.pending()) - contacts.size();
                     if (add > 0)
                     {
-                        E all = consistencyLevel == 
ConsistencyLevel.LOCAL_QUORUM ? live.all().sorted(replicasInDcComparator) : 
live.all();
+                        E all = consistencyLevel.isDatacenterLocal() ? 
live.all().filter(InOurDcTester.replicas()) : live.all();

Review Comment:
   @Runtian 
   
   Blake said "So after the removal of 
read_repair_chance/dclocal_read_repair_chance in 
[CASSANDRA-13910](https://issues.apache.org/jira/browse/CASSANDRA-13910), there 
should never be a case where a DC local read or read repairs are talking to 
remote DCs."
   
   So I think this is wrong, no? We should just do 
`live.all().filter(InOurDcTester.replicas())` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to