# mco_HA_trans_commit_synch

This function can be called by a separate thread of the primary master process in order to implement synchronization of committed transactions completed by other (secondary) masters attached to a shared memory database.

### For an overview see page HA Applications

### Prototype

        MCO_RET	mco_HA_trans_commit_synch (	mco_db_h db)

### Arguments

db | Connection handle to master database

### Description

This function is called by a separate thread of the primary master process in order to implement synchronization of committed transactions completed by other (secondary) masters attached to a shared memory database (see `MCO_MULTIPROCESS_COMMIT` flag). This function returns if an error occurs during replication or `mco_HA_stop()` is called in the main thread.

### Return Codes

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.)