java-driver icon indicating copy to clipboard operation
java-driver copied to clipboard

3.x|4.x: LWT Statements routing decision is ignoring lb policy

Open dkropachev opened this issue 1 year ago • 0 comments

Both 3.x and 4.x ignore LoadBalancingPolicy and return all the replicas in the same order they get it from vnodes or tablets for LWT statements and it seems wrong to me:

  • Java 3.x https://github.com/scylladb/java-driver/blob/31a7a72930d7ce3141ae7c7421f38a5ba2fd0039/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java#L144-L159
  • Java 4.x https://github.com/scylladb/java-driver/blob/4ba065770b9bffa86ea4ac537ea15e6e98a3945f/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlRequestHandler.java#L208-L226

As result there is no way to make them target rack or dc, even more than that, when user feeds RackAwareRoundRobinPolicy to cluster config LWT queries are getting routed, unexpectedly, to all racks.

dkropachev avatar Nov 19 '24 13:11 dkropachev