-
Notifications
You must be signed in to change notification settings - Fork 49
Update TokenAwarePolicy.make_query_plan to schedule to replicas first #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Shouldn't we add tests to ensure this works well? |
1c32d98 to
f8b6883
Compare
Of course. |
f8b6883 to
95db675
Compare
159db98 to
1841776
Compare
Are we sure that this is the right order? I vaguely remember a discussion during summit whether we should query local (dc/rack) nodes that are non-replicas or remote replicas first, and the answer was not obvious. @Lorak-mmk @avikivity |
|
@gusev-p we would appreciate your opinion on this matter too. |
|
@gusev-p , @avikivity , @Lorak-mmk , please take a look, we need to release python-driver ASAP |
Lorak-mmk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a point in waiting for discussion about the correct order. The PR improves the order undoubtedly, and it matches e.g. Rust Driver order (and probably some other drivers too).
Changing this order is imo a separate task and we can discuss it in https://github.com/scylladb/scylla-drivers/issues/36
End result should be like this: 1. Replicas from the same RACK (if rack is specified) 2. Replicas from the same DC, but Remote RACK (if rack is specified) 3. Replicas from the same DC (if rack is not specified) 3. Replicas from the remote DC 5. Non-replicas in the same order
1841776 to
af7e1dd
Compare
End result should be like this:
Pre-review checklist
I have provided docstrings for the public items that I want to introduce.I have adjusted the documentation in./docs/source/.Fixes:annotations to PR description.