Comments - Delayed Replication
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.
One more field of interest for monitoring is Seconds_Behind_Master. When initially the slave is in sync the four fields would say the following:
Here 30 seconds is my preference for MASTER_DELAY.
Once the master has updated some data
and it is replicated the fields show is progressed maintaining
property:
Note the above formula is correct only to the serial "legacy" slave.
In the parallel case the relation between the above parameters can be seen from the following illustration.
Let the binlog contains two adjacent events
Let the parallel slave is set up with
Suppose they arrive at slave about the time, the 1st is executed to commit its transaction and by that update Seconds_Behind_Master's "base". Since this point
when the timezone difference is implied to be zero. Now the 2nd transaction starts, and say at 8:00:20 it would be still hanging in waiting, Show-Slave-Status reports
The first line value may surprise yet it says the last committed transaction was that many seconds ago. The 2nd transaction will start in 40 seconds and only when it ends Seconds_Behind_Master's "base" will update again. That means all execution time of the second transaction Seconds_Behind_Master would be growing over 3600 + 60.