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.

Related posts from the blog:

  1. About MySQL storage engines and replication
    I know most articles are more about DBA issues, however, being a MySQL DBA means that you have...
  2. Using Checksums to Ensure Table Consistency in MySQL
    If you’re using MySQL replication, chances are your master and slave databases aren’t entirely consistent. There are a...
  3. MySQL 5.5 GA announcement
    This morning, Oracle gave a MySQL technology update that included the announcement that MySQL 5.5 is GA.  The...
  4. OurSQL Episode 45: Hackathon Success! (MySQL -> MongoDB replication)
    At Open Database Camp in Sardinia last week, there was a hackfest to try to get replication working...
  5. OurSQL Episode 44: Elemental Replication (Tungsten, that is)
    Last week's podcast, containing an overview of replication This week we have Robert Hodges, CEO of Continuent, talking...

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