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

Update tablets invalidation logic #1130

Open
dkropachev opened this issue Nov 22, 2024 · 1 comment
Open

Update tablets invalidation logic #1130

dkropachev opened this issue Nov 22, 2024 · 1 comment
Assignees

Comments

@dkropachev
Copy link
Collaborator

dkropachev commented Nov 22, 2024

Invalidation on events

  • On SCHEMA_CHANGE, for target keyspace + table, for all change types: UPDATED or DROPPED drop related tablet records.
  • On TOPOLOGY_CHANGE, for REMOVED_NODE (and probably MOVED_NODE) change type, all tablet records that contains this node, to be removed.

Possible optimizations:

  • On SCHEMA_CHANGE change types: UPDATED driver can look at what have changed and if nothing that can trigger tablet migration (say, ks replication factor and tablet feature on the table) is touched, then invalidation to be voided

Invalidation on control connection reconnect

When cc is lost, driver can miss some of the events.
So we need some logic to catch up:

  • Read keyspace and table descriptions to find if any keyspace or table was removed or updated, doing exactly the same what should be done for SCHEMA_CHANGE event.
  • Read system.peers to find if any node was removed and do the same what should be done for TOPOLOGY_CHANGE event.
@Lorak-mmk
Copy link
Collaborator

Note: the only thing that is not already handle is updating (not dropping!) keyspace / table (SCHEMA_CHANGE UPDATED event).

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

No branches or pull requests

2 participants