bereng commented on a change in pull request #870:
URL: https://github.com/apache/cassandra/pull/870#discussion_r564442977



##########
File path: src/java/org/apache/cassandra/dht/RangeStreamer.java
##########
@@ -353,9 +361,20 @@ public void addRanges(String keyspaceName, 
ReplicaCollection<?> replicas)
      */
     private boolean useStrictSourcesForRanges(AbstractReplicationStrategy 
strat)
     {
-        return useStrictConsistency
-                && tokens != null
-                && metadata.getSizeOfAllEndpoints() != 
strat.getReplicationFactor().allReplicas;
+        int nodes = 0;
+
+        if (strat instanceof NetworkTopologyStrategy)

Review comment:
       We could add a `getReplicationFactor(dc)` to `SimpleStrategy` to 
collapse this further thx to inheritance. But that would mean 
`SimpleStrategy.getReplicationFactor(dc)` would have to compare the dc strings 
to match. That would go against 
`AbstractReplicationStrategy.getReplicationFactor()` notes stating this should 
be FAST. The extra string comparison is the problem so I opted for this 
solution. Happy to discuss.




----------------------------------------------------------------
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.

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