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

4.x: Improve DefaultMetadata's TabletMap tablet invalidation logic #388

Merged

Conversation

Bouncheck
Copy link
Collaborator

Previously the tablet map would be completely emptied on node removal, necessitating full rebuild of it. With this change the TabletMap will be scanned through on node removals (RemoveNodeRefresh) in order to delete only those tablets, that contain removed node as one of the replicas.

Additionally we introduce TabletMapSchemaChangeListener which will be automatically registered on context initialization as long as schema metadata is enabled. It won't be added if the schema metadata is enabled later at runtime. This listener ensures that relevant tablets will be removed on removals and updates of both keyspaces and tables. The TabletMapSchemaChangesIT tests its behaviour.

Addresses #377.

@Bouncheck Bouncheck self-assigned this Nov 28, 2024
@Bouncheck Bouncheck changed the title Improve DefaultMetadata's TabletMap tablet invalidation logic 4.x: Improve DefaultMetadata's TabletMap tablet invalidation logic Nov 28, 2024
@Bouncheck Bouncheck requested a review from dkropachev November 28, 2024 18:12
@Bouncheck Bouncheck force-pushed the scylla-4.x-tablet-invalidation-pub branch from 2afb08a to bdd677e Compare November 28, 2024 18:15
Previously the tablet map would be completely emptied on node removal,
necessitating full rebuild of it. With this change the TabletMap will
be scanned through on node removals (`RemoveNodeRefresh`) in order to delete
only those tablets, that contain removed node as one of the replicas.

Additionally we introduce `TabletMapSchemaChangeListener` which will be
automatically registered on context initialization as long as schema metadata
is enabled. It won't be added if the schema metadata is enabled later at
runtime. This listener ensures that relevant tablets will be removed
on removals and updates of both keyspaces and tables.
The `TabletMapSchemaChangesIT` tests its behaviour.

Addresses scylladb#377.
@dkropachev dkropachev merged commit 200137b into scylladb:scylla-4.x Nov 29, 2024
9 of 10 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