Semisynchronous Replication
You are viewing an old version of this article. View
the current version here.
MariaDB includes the Semisynchronous replication plugin. To make the functionality available it should be installed first:
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so'; INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
Contents
Correct installation can be checked by seeing if the plugins are listed after issuing the SHOW PLUGINS statement.
MariaDB starting with 10.1.3
Enhanced semisync replication was added in MariaDB 10.1.3 (MDEV-162)
The following system variables are added when either the master or slave Semisynchronous replication plugin is installed:
System Variables
rpl_semi_sync_master_enabled
- Description: Set to
ON
to enable semi-synchronous replication master. Disabled by default. - Commandline:
--rpl-semi-sync-master-enabled[={0|1}]
- Scope: Global
- Dynamic: Yes
- Data Type:
boolean
- Default Value:
OFF
rpl_semi_sync_master_timeout
- Description: The timeout value, in milliseconds, for semi-synchronous replication in the master. If this timeout is exceeded in waiting on a commit for acknowledgement from a slave, the master will revert to asynchronous replication, setting the Rpl_semi_sync_master_status status variable to
OFF
as it does so. - Commandline:
--rpl-semi-sync-master-timeout[=#]
- Scope: Global
- Dynamic: Yes
- Data Type:
numeric
- Default Value:
10000
(10 seconds) - Range:
0
to18446744073709551615
rpl_semi_sync_master_trace_level
- Description: The tracing level for semi-sync replication.
- Commandline:
--rpl-semi-sync-master-trace-level[=#]
- Scope: Global
- Dynamic: Yes
- Data Type:
numeric
- Default Value:
32
- Range:
0
to18446744073709551615
rpl_semi_sync_master_wait_no_slave
- Description: Wait until timeout when no semi-synchronous replication slave available (enabled by default).
- Commandline:
--rpl-semi-sync-master-wait-no-slave[={0|1}]
- Scope: Global
- Dynamic: Yes
- Data Type:
boolean
- Default Value:
ON
rpl_semi_sync_master_wait_point
- Description: Whether the transaction should wait for semi-sync ack after having synced binlog, or after having committed in storage engine.
- Commandline:
--rpl-semi-sync-master-wait-point=value
- Scope: Global
- Dynamic: Yes
- Data Type:
enum
- Default Value:
AFTER_COMMIT
- Valid Values:
AFTER_SYNC
,AFTER_COMMIT
rpl_semi_sync_slave_enabled
- Description: Enable semi-synchronous replication slave (disabled by default).
- Commandline:
--rpl-semi-sync-slave-enabled[={0|1}]
- Scope: Global
- Dynamic: Yes
- Data Type:
boolean
- Default Value:
OFF
rpl_semi_sync_slave_trace_level
- Description: The tracing level for semi-sync replication.
- Commandline:
--rpl-semi-sync-slave-trace_level[=#]
- Scope: Global
- Dynamic: Yes
- Data Type:
numeric
- Default Value:
32
- Range:
0
to18446744073709551615
Status Variables
For a list of status variables added when the plugin is installed, see Semisynchronous Replication Plugin Status Variables.
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.