scylladb / java-driver

ScyllaDB Java Driver for ScyllaDB and Apache Cassandra, based on the DataStax Java Driver
Apache License 2.0
61 stars 37 forks source link

Review `DCAwareRoundRobinPolicy` host distance calculation #223

Open Gor027 opened 1 year ago

Gor027 commented 1 year ago

While working on RackAwarePolicy, it was noticed that DCAwareRoundRobinPolicy considers hosts without local datanceter information to be considered local. In RackAwarePolicy, only if localDc is UNSET then a host without local dc information can be considered local. One of these approaches is wrong, most probably DCAwareRoundRobinPolicy::distance should be modified.

roydahan commented 3 months ago

Need to check if it's still the case.