3.x: Fix LWT PRESERVE_REPLICA_ORDER routing to include non-replica nodes#834
Merged
dkropachev merged 1 commit intoscylla-3.xfrom Mar 6, 2026
Merged
Conversation
The PreserveReplicaOrderIterator in TokenAwarePolicy previously returned only replica nodes in the query plan. When replicas were unavailable (e.g. prepared statements before parameter binding, or replicas going down after plan construction), the query plan could be empty or insufficient, causing "No node was available" errors. The fix adds a third pass that appends non-replica nodes from the child policy after all replicas have been returned. When no replicas are available at all (all DOWN/IGNORED), the full child policy fallback is preserved. Fixes #833
a57613d to
e960106
Compare
Author
Query Plan Ordering Summary for
|
nikagra
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PreserveReplicaOrderIteratorinTokenAwarePolicyto include non-replica nodes after replicas in the query plan, preventing "No node was available" failures when replicas are insufficientTest plan
Fixes #833
Port of #831 (4.x fix) to scylla-3.x