There is following code:
|
if (host.isUp() |
|
&& replicas.contains(host) |
|
&& childPolicy.distance(host) == HostDistance.LOCAL) { |
|
// UP replicas should be prioritized, retaining order from childPolicy |
|
return host; |
|
} else { |
|
// save for later |
|
if (nonReplicas == null) nonReplicas = new ArrayList<Host>(); |
|
nonReplicas.add(host); |
|
} |
That treats down replicas same way as nonreplicas, it looks wrong, we need to look at it.
There is following code:
java-driver/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java
Lines 222 to 231 in e2367be
That treats down replicas same way as nonreplicas, it looks wrong, we need to look at it.