Skip to content

4.x: Make driver invalidate tablets #377

@dkropachev

Description

@dkropachev

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions