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

4.x: Fix LWT routing

Open dkropachev opened this issue 1 year ago • 0 comments

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.

dkropachev avatar Nov 26 '24 14:11 dkropachev