ReplicationFeatures/SemiSyncReplication
Contents |
[edit] SEMI-SYNCHRONOUS REPLICATION
Feature preview from a contributed patch from Mark Callaghan and Wei Li, Google, that was modified by Zhenxing He, MySQL Replication Team.
[edit] Provides:
A facility for highly available replication. If the master crash after having committed a transaction, the slave is guaranteed to have receive it.
[edit] Use case:
If the master crash, the slave can be instantly promoted to substitute the old master. The slave has all the master's transactions either in its relay-log or already applied.
[edit] User interface:
- the server startup options:
master:
--rpl_semi_sync_enabled=1|0
--rpl_semi_sync_timeout= timeout value in seconds
slave:
--rpl_semi_sync_slave_enabled=1|0
- run time facilities:
master:
set global rpl_semi_sync_enabled=1|0;
show status like 'Rpl_semi_sync_clients';
show status like 'Rpl_semi_sync_status';
show status like 'Rpl_semi_sync_no_tx';
show status like 'Rpl_semi_sync_yes_tx';
slave:
set global rpl_semi_sync_slave_enabled = 1|0;
show status like 'Rpl_semi_sync_slave_status';
[edit] Modifications made by MySQL:
- Converted MySQL 5.0 google patch to MySQL 5.1
- Made it storage engine independent (removed modifications to InnoDB)
- Made RESET MASTER reset semi-sync master status
- Modularized code (work in progress)
[edit] References:
- http://code.google.com/p/google-mysql-tools/wiki/SemiSyncReplication
- http://code.google.com/p/google-mysql-tools/wiki/SemiSyncReplicationDesign
- WL#1720 Semi-synchronous replication
[edit] Associated issues:
- Recovery based on the global transaction identifier.
[edit] Downloads:
- Linux binary: http://downloads.mysql.com/forge/replication_features_preview/mysql-5.1.24-with-semi-sync-repl-linux-i686.tar.gz
- Source code: http://downloads.mysql.com/forge/replication_features_preview/mysql-5.1.24-with-semi-sync-repl.tar.gz
[edit] Thanks:
Mark Callaghan and Wei Li from Google whose original patch for 5.0 was converted by Zhenxing He MySQL Replication Team.