1 Nov

Semi-Synchronous Replication in MySQL 5.5

As I was digging into the change logs for MySQL 5.5 and the replication substructure, I ran into the new features of semi-synchronous replication.

This is implemented in MySQL 5.5 with the master database blocking and not returning the session after writing to the binary log unless a slave (which has also identified itself as running semi-synchronous replication) has acknowledged that it has replicated and committed the changes to it’s own relay log and flushed them to disk.

I suspect there are a lot of caveats.

From the documentation,

While the master is blocking (waiting for acknowledgment from a slave after having performed a commit), it does not return to the session that performed the transaction. When the block ends, the master returns to the session, which then can proceed to execute other statements. At this point, the transaction has committed on the master side, and receipt of its events has been acknowledged by at least one slave.

I’m excited about testing this feature, though I’m ambivalent about the failure mode of dropping immediately (after a timeout) to¬†asynchronous¬†replication.

2 Responses to “Semi-Synchronous Replication in MySQL 5.5”

  1. Giuseppe Maxia 03. Nov, 2010 at 7:28 pm #

    Please see:
    Testing MySQL 5.5 semi-synchronous replication – http://datacharmer.blogspot.com/2010/11/testing-mysql-55-semi-synchronous.html

    Cheers

    Giuseppe

  2. sarah novotny 04. Nov, 2010 at 11:43 am #

    thanks for the pointer, Giuseppe!

Leave a Reply