hhandoko / cassandra-migration

Apache Cassandra / DataStax Enterprise database migration (schema evolution) library
Apache License 2.0
51 stars 21 forks source link

Configure DCAwareRoundRobinPolicy to consider remote hosts #80

Open jameswren opened 6 years ago

jameswren commented 6 years ago

Expected Behaviour

When no local hosts are available, remote hosts are used.


Actual Behaviour

When no local hosts are available, remote hosts are not used.


Suggested fix

Configure withUsedHostsPerRemoteDc on the cluster builder's LoadBalancingPolicy:

CassandraMigration.kt#L289 https://docs.datastax.com/en/latest-java-driver-api/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.Builder.html#withUsedHostsPerRemoteDc-int-