If a primary fails, the HA component takes over the failed query: (1) It does a lookup in the catalog to figure out what was running at the primary, (2) it instantiates all queries and stream subscriptions locally, and (3) it updates the catalog
|
Public Types |
typedef map< MedusaID, ptr<
MonitoredNode > > | MonitoredNodes |
typedef map< MedusaID, ptr<
Secondary > > | Secondaries |
Public Member Functions |
| HA (string id, string configFileName=DEFAULT_CONFIG_FILE, RecoveryMethod recovery_method=UPSTREAM_BACKUP) |
| Constructor.
|
| ~HA () |
AsyncRPC< void > | replicate_query (MedusaID primary, Query query) |
| Replicate locally the given queries and subscriptions that are running at the primary.
|
AsyncRPC< void > | replicate_subs (MedusaID primary, vector< Subscription > subs) |
| Replicate locally the given subscriptions from primary.
|
RPC< void > | keep_alive () |
| Invoked by backup HA component on the monitored nodes to determine their state (up or down).
|
RPC< void > | failure_notification (MedusaID failed_node, Time time_failure_detected) |
| Notification that a monitored node is down.
|
RPC< void > | start () |
| Enable HA.
|
RPC< void > | stop () |
| Suspend HA.
|
| NMSTL_RPC_OBJECT (HA) |
RecoveryMethod | get_recovery_method () |
| Returns the recovery method being used.
|
bool | is_primary () |
| Determines if this HA component is for a primary engine.
|
RPC< vector< MedusaID > > | get_secondary_ids () |
| Returns the secondaries.
|
Protected Member Functions |
void | in_thread_init () |