Skip to content
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

3.x: Add usesTablets to KeyspaceMetadata #403

Merged

Conversation

Bouncheck
Copy link
Collaborator

@Bouncheck Bouncheck commented Jan 3, 2025

Adds the field to KeyspaceMetadata that informs if the keyspace has tablets
enabled. It is initialized with value false and updated to true only if
the keyspace is discovered in system_schema.scylla_keyspaces and its entry
has non-null value in initial_tablets column. The update happens on schema
refresh.

Updates Metadata#getReplicas to use this keyspace metadata information to
decide whether to look for replicas in the token map or tablet map.

Fixes #380.

@Bouncheck Bouncheck force-pushed the scylla-3.x-getReplicas-rework branch from b172384 to 788c35f Compare January 7, 2025 10:12
@Bouncheck Bouncheck marked this pull request as ready for review January 7, 2025 12:58
@Bouncheck Bouncheck self-assigned this Jan 7, 2025
@Bouncheck Bouncheck changed the title 3.x Draft: Add usesTablets to KeyspaceMetadata 3.x Add usesTablets to KeyspaceMetadata Jan 7, 2025
@Bouncheck Bouncheck changed the title 3.x Add usesTablets to KeyspaceMetadata 3.x: Add usesTablets to KeyspaceMetadata Jan 7, 2025
@Bouncheck Bouncheck force-pushed the scylla-3.x-getReplicas-rework branch from 788c35f to 29328a2 Compare January 7, 2025 15:17
@Bouncheck Bouncheck requested a review from dkropachev January 7, 2025 15:18
@Bouncheck Bouncheck force-pushed the scylla-3.x-getReplicas-rework branch from 29328a2 to 1d543db Compare January 7, 2025 15:19
Adds the field to `KeyspaceMetadata` that informs if the keyspace has tablets
enabled. It is initialized with value `false` and updated to `true` only if
the keyspace is discovered in `system_schema.scylla_keyspaces` and its entry
has non-null value in `initial_tablets` column. The update happens on schema
refresh.

Updates `Metadata#getReplicas` to use this keyspace metadata information to
decide whether to look for replicas in the token map or tablet map.

Fixes scylladb#380.
@dkropachev dkropachev merged commit 8664e60 into scylladb:scylla-3.x Jan 7, 2025
10 of 11 checks passed
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.

2 participants