Skip to content

Commit c565622

Browse files
committed
MDEV-14528 followup.
There was a failure in rpl_delayed_slave after recent MDEV-14528 commit. The parallel applier should not set its Relay_log::last_master_timestamp from Format-descriptor log event. The latter may reflect a deep past so Seconds-behind-master will be computed through it and displayed all time while the first possibly "slow" group of events is executed. The main MDEV-14528 is refined, rpl_delayed_slave now passes also in the parallel mode.
1 parent e82ebb8 commit c565622

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

mysql-test/suite/rpl/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ rpl_row_binlog_max_cache_size : MDEV-11092
1717
rpl_blackhole : MDEV-11094
1818
rpl_row_mysqlbinlog : MDEV-11095
1919
rpl_row_index_choice : MDEV-11666
20-
rpl_delayed_slave : MDEV-14528

sql/slave.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3962,7 +3962,15 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
39623962
*/
39633963
if (!(ev->is_artificial_event() || ev->is_relay_log_event() || (ev->when == 0)))
39643964
{
3965-
rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
3965+
/*
3966+
Ignore FD's timestamp as it does not reflect the slave execution
3967+
state but likely to reflect a deep past. Consequently when the first
3968+
data modification event execution last long all this time
3969+
Seconds_Behind_Master is zero.
3970+
*/
3971+
if (ev->get_type_code() != FORMAT_DESCRIPTION_EVENT)
3972+
rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
3973+
39663974
DBUG_ASSERT(rli->last_master_timestamp >= 0);
39673975
}
39683976
}

0 commit comments

Comments
 (0)