1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Andrei Elkin
2018-11-07 15:24:30 +02:00
parent e82ebb8f06
commit c565622c6c
2 changed files with 9 additions and 2 deletions

View File

@@ -17,4 +17,3 @@ rpl_row_binlog_max_cache_size : MDEV-11092
rpl_blackhole : MDEV-11094 rpl_blackhole : MDEV-11094
rpl_row_mysqlbinlog : MDEV-11095 rpl_row_mysqlbinlog : MDEV-11095
rpl_row_index_choice : MDEV-11666 rpl_row_index_choice : MDEV-11666
rpl_delayed_slave : MDEV-14528

View File

@@ -3962,7 +3962,15 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
*/ */
if (!(ev->is_artificial_event() || ev->is_relay_log_event() || (ev->when == 0))) if (!(ev->is_artificial_event() || ev->is_relay_log_event() || (ev->when == 0)))
{ {
rli->last_master_timestamp= ev->when + (time_t) ev->exec_time; /*
Ignore FD's timestamp as it does not reflect the slave execution
state but likely to reflect a deep past. Consequently when the first
data modification event execution last long all this time
Seconds_Behind_Master is zero.
*/
if (ev->get_type_code() != FORMAT_DESCRIPTION_EVENT)
rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
DBUG_ASSERT(rli->last_master_timestamp >= 0); DBUG_ASSERT(rli->last_master_timestamp >= 0);
} }
} }