mco_HA_set_trans_window_size

This function is called by the master to set the transaction packet size.

For an overview, see HA Applications.

Prototype

    MCO_RET mco_HA_set_trans_window_size(mco_trans_h t,
                                          uint4 window_size);

Arguments

t
Transaction handle for an active READ_WRITE transaction.
window_size
Transaction window (packet) size (default is 1).

Description

This function is called by the master to set the transaction packet size. With synchronous replication (default mode), a replica does not confirm each of the master’s transactions, but a transaction packet as a whole. Thus, the larger the window_size, the fewer confirmations the replica will send to the master. This can improve the speed of replication, but the replica can “lag” behind the master up to window_size transactions.

It should be called from within the context of an active READ_WRITE transaction. Note: With asynchronous replication this function has no effect.

Return Codes

MCO_S_OK
The master transaction window size was set successfully.
MCO_E_ACCESS
The function was called in a read-only transaction context.
MCO_E_NOMEM
Out of memory attempting to set up the transaction log.