This function is used by the master in order to send the "KEEP_ALIVE" signal to replicas.
MCO_RET mco_HA_keep_alive(mco_db_h db,
timer_unit timeout);
db
timeout
KEEP_ALIVE message.This function is used by the master in order to send the KEEP_ALIVE signal to replicas. It is used by
master applications that will be idle longer than the timeout value specified by the wait_data_timeout of
the mco_connection_param_t structure in the mco_HA_attach_master()
call. (Please note that keep-alive and the mco_HA_attach_replica()
threads need to have their own separate database connections.)
Also note that in shared-memory applications, the mco_HA_keep_alive() function works only with “primary”
connections. This is because if the master database is a shared-memory database and several processes access it, only
one process (called "primary") handles connections to replicas. So only the primary master process can call
network-related functions, such as mco_HA_keep_alive(), mco_HA_attach_replica(),
and mco_HA_detach_replica().
MCO_S_OK
MCO_E_HA_NOT_INITIALIZED
mco_HA_start function must be called first.MCO_E_HA_TIMEOUT
MCO_E_HA_IOERROR
KEEP_ALIVE message to replicas.