This function is called by the master if asynchronous replication mode is enabled to send transaction data from its buffer to replicas.
mco_channel_h mco_HA_async_send_data_to_replicas ( mco_db_h db )
| db | Connection handle to master database |
This function must be called in a separate thread of the master if asynchronous replication mode is enabled (see MCO_HAMODE_ASYNCH flag) to send transaction data from its buffer to replicas (async_databuf field of mco_HA_params_t structure). For shared-memory applications only the primary master process must call mco_HA_async_send_data_to_replicas(). The function can be blocked if the async_buffer is empty (no data to send).
Note: Calling mco_HA_stop() forces mco_HA_async_send_data_to_replicas() to exit with MCO_E_HA_STOPPED.
| MCO_S_OK | Successful. |
| MCO_E_HA_NOT_INITIALIZED | The HA subsystem has not been initialized – the function mco_HA_start must be called first. |
| MCO_E_HA_STOPPED | The main thread has called mco_HA_stop(). (mco_HA_async_send_data_to_replicas() is a blocking function and is called by a separate thread.) |