With a MySQL chain replication setup, e.g. M1->S1->S2
, what exactly is the order of operations for writing to the first slave? Is the binary log from the master simply streamed directly through to the second slave? Or are database updates to the first slave committed before replicating those updates to the second slave?
The documentation for --log-slave-updates
states This option causes the slave to write the updates performed by its SQL thread to its own binary log
. It's not clear to me if this is done in parallel or only after data is written. I'm only interested in row-based replication, if that matters.
I ask because I have the unusual situation of a custom application acting as a second slave and operating on events that come through the binary log. It runs queries on the first slave. If the log events were to get to the application before writes on the first slave are committed, it will be operating on stale data.