Skip to content

Fix BasicLoadBalancingPolicy.getReplica empty partitioner #503

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

Merged

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Apr 7, 2025

DefaultBoundStatement getting it's paritioner from when it is being prepared against cdc table.
In other cases statement does not get any partitioner.
For proper tablet routing driver needs to calculate token from the key, which needs partitioner, if partitioner is not present driver returns empty replica list.

This PR is rather quick-fix.
Implementing proper solution that will help with CDC+tablets case, is scheduled at #502

Fixes: #497
Tests for fixed functionality to be added in #506

@dkropachev dkropachev force-pushed the dk/fix-get-replicas-for-tablets branch 2 times, most recently from 9c085de to 9bc2bf0 Compare April 7, 2025 11:13
Queries getting paritioner set either from user, or when statement is
being built against cdc tablet.
In other cases statement does not get any partitioner.
For proper tablet routing driver needs to calculate token from the key,
which needs partitioner, if partitioner is not present driver returns empty replica list.

This fix is rather quick-fix.
Implementing proper solution that will help with CDC+tablets case, is
scheduled at scylladb#502
@dkropachev dkropachev force-pushed the dk/fix-get-replicas-for-tablets branch from 9bc2bf0 to d90c5a4 Compare April 7, 2025 11:14
@dkropachev dkropachev merged commit eb3f5d0 into scylladb:scylla-4.x Apr 7, 2025
8 of 10 checks passed
@dkropachev dkropachev self-assigned this Apr 8, 2025
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.

4.x: BasicLoadBalancingPolicy.getReplicas() is always empty with Tablets enabled
2 participants