You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix LWT routing: preserve Paxos leader order in TokenAwarePolicy
TokenAwarePolicy.make_query_plan() was re-sorting replicas by distance
(LOCAL_RACK > LOCAL > REMOTE) via yield_in_order(), which could demote
the Paxos leader when using RackAwareRoundRobinPolicy if the leader
happened to be in a different rack than the client. This causes an
extra network hop for every LWT operation, increasing latency.
For the tablet code path, replicas were derived from the child policy's
round-robin order, completely losing the natural token-ring order.
Fix: For LWT queries, yield replicas in their natural order (token-ring
for non-tablet, tablet.replicas order for tablet), skipping only hosts
that are down or IGNORED. Non-replica fallback hosts still use distance-
based ordering. Non-LWT queries are completely unchanged.
Fixes: #780, #781
0 commit comments