-
Venkatesh Duggirala authored
MTS & ROTATING RELAY-LOG Problem: The value of 'Seconds_Behind_Master' (SBM) reports distorted number when rotating a relay-log. Analysis: The issue is happening only on MTS enabled Slaves. The distorted number is coming while the Slave is executing fake rotate events. Fake rotate event (=which does not exist physically in any binlog) is a rotate event, which contains the name of the binlog Master is going to send to the slave (because the slave may not know the binlog name if it just asked for MASTER_LOG_FILE='', MASTER_LOG_POS=4). These events contains zero in it's even time stamp value which will be replaced by Slave's during the execution with I/O thread's time. If SBM is calculated while these fake rotate events are executing, the SBM value end up in getting big number which confuses the users. Fix: For Single thread slaves, Slave server is already ignoring to set the last master_time stamp (which is used to calculate SBM) if the event is fake/artificial event by using is_artificial_event() function. Now with this patch, Slave will ignore these fake/artificial rotate events even in MTS execution path as well.
Venkatesh Duggirala authoredMTS & ROTATING RELAY-LOG Problem: The value of 'Seconds_Behind_Master' (SBM) reports distorted number when rotating a relay-log. Analysis: The issue is happening only on MTS enabled Slaves. The distorted number is coming while the Slave is executing fake rotate events. Fake rotate event (=which does not exist physically in any binlog) is a rotate event, which contains the name of the binlog Master is going to send to the slave (because the slave may not know the binlog name if it just asked for MASTER_LOG_FILE='', MASTER_LOG_POS=4). These events contains zero in it's even time stamp value which will be replaced by Slave's during the execution with I/O thread's time. If SBM is calculated while these fake rotate events are executing, the SBM value end up in getting big number which confuses the users. Fix: For Single thread slaves, Slave server is already ignoring to set the last master_time stamp (which is used to calculate SBM) if the event is fake/artificial event by using is_artificial_event() function. Now with this patch, Slave will ignore these fake/artificial rotate events even in MTS execution path as well.
Loading