Skip to main content

Module primary_tracker

Module primary_tracker 

Source
Expand description

Primary Tracker - Tracks current primary node for query routing

Monitors cluster topology and maintains the current primary node information. During switchover, updates are received from the switchover coordinator to ensure queries are routed correctly.

§Topology Providers

The primary tracker uses a TopologyProvider trait to abstract over different topology sources:

  • HeliosDB: Uses the internal TopologyManager from the replication subsystem (feature-gated behind heliosdb-topology).
  • PostgreSQL: Polls pg_stat_replication / pg_is_in_recovery() to detect primary changes (feature-gated behind postgres-topology).
  • Manual/Standalone: Programmatic set/clear via API calls.

Modules§

heliosdb_provider
Bridge to the HeliosDB-Lite internal TopologyManager.

Structs§

PostgresNode
PostgresTopologyProvider
PostgreSQL-based topology provider.
PrimaryInfo
Primary node information
PrimaryTracker
Primary Tracker
TopologyNodeInfo
Information about a node in the cluster topology.

Enums§

PrimaryChangeEvent
Primary change event
TopologyEvent
Events emitted by a topology provider.

Traits§

TopologyProvider
Trait abstracting topology discovery.