scylladb / java-driver

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

docs: information about ReplicaOrdering needed in load_balancing manual #270

Open sylwiaszunejko opened 10 months ago

sylwiaszunejko commented 10 months ago

I would like to report an issue in page: https://github.com/scylladb/java-driver/blob/085dd34ef46b1de5111629bdccfe4056c4355676/manual/load_balancing/README.md

Problem

In TokenAwarePolicy section, there is no mention of the ReplicaOrdering field and when it should be set to ReplicaOrdering.NEUTRAL. This information is covered here: https://github.com/scylladb/java-driver/blob/085dd34ef46b1de5111629bdccfe4056c4355676/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java#L90-L98. Although it states that it is important for the LatencyAwarePolicy, in reality, the RackAwareRoundRobinPolicy also does not function correctly without this option.

Lack of this information in the docs is causing a problem in cassandra-stress (https://github.com/scylladb/java-driver/issues/255#), which is currently being addressed by adding ReplicaOrdering.NEUTRAL to the TokenAwarePolicy (https://github.com/scylladb/scylla-tools-java/pull/367).

fruch commented 10 months ago

beside the docs, I think a warning of misuse might be in order...