Update TokenAwarePolicy.make_query_plan to schedule to replicas first#574
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.
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.