Skip to content

policies: treat SERIAL/LOCAL_SERIAL consistency as LWT for routing#887

Open
mykaul wants to merge 1 commit into
scylladb:masterfrom
mykaul:fix-serial-consistency-lwt-routing
Open

policies: treat SERIAL/LOCAL_SERIAL consistency as LWT for routing#887
mykaul wants to merge 1 commit into
scylladb:masterfrom
mykaul:fix-serial-consistency-lwt-routing

Conversation

@mykaul
Copy link
Copy Markdown

@mykaul mykaul commented May 13, 2026

Summary

  • TokenAwarePolicy now skips replica shuffling for statements with SERIAL or LOCAL_SERIAL consistency level, treating them as LWT-routing candidates
  • Previously only is_lwt() (from server prepare metadata) was checked, meaning serial-consistency reads got shuffled replicas instead of deterministic Paxos-optimal ordering
  • Added unit test validating no-shuffle behavior for both vnode and tablet clusters with serial consistency

Fixes: #886

Related: scylladb/java-driver#885

Statements with SERIAL or LOCAL_SERIAL consistency level are serialized
through the Paxos path on the server, but TokenAwarePolicy only checked
is_lwt() (from server prepare metadata) when deciding whether to skip
replica shuffling. This meant serial-consistency reads could be routed
with shuffled replicas instead of the deterministic order needed for
optimal Paxos coordination.

Now TokenAwarePolicy also checks the statement's consistency level and
skips shuffling for SERIAL/LOCAL_SERIAL, matching LWT routing behavior.

Fixes: scylladb#886
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TokenAwarePolicy does not route SERIAL/LOCAL_SERIAL statements as LWT requests

1 participant