java-driver
java-driver copied to clipboard
3.x: Fix LWT routing
Currently LWT routing does not involve LoadBlancingPolicy at all https://github.com/scylladb/java-driver/blob/dbfe82a3b5fcf9f3171bf531ef5675b0cdc27e66/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java#L146-L154
And returns vnode/tablet replicas as they are.
As result if user configured cluster with TokenAwarePolicy+DCAwareRoundRobinPolicy/RackAwareRoundRobinPolicy as LoadBalancingPolicy they expect to see queries routed to a particular DC, but driver voids rack/dc awarness and route traffic to first replica first, which could be from another Dc/Rack.