diff options
author | Brandon Nesterenko <brandon.nesterenko@mariadb.com> | 2022-01-05 08:35:05 -0700 |
---|---|---|
committer | Brandon Nesterenko <brandon.nesterenko@mariadb.com> | 2022-01-05 08:40:20 -0700 |
commit | ddd79e29059dbb065c9f817382e4a0378171ba1d (patch) | |
tree | bf8045d13d634a1ef9266fe0ef01bbf83d0d9fb0 /sql/log.cc | |
parent | a48d2ec866751e9da76066bf3a30f99da9031ab0 (diff) | |
download | mariadb-git-10.4-MDEV-16091-merge.tar.gz |
MDEV-16091: Seconds_Behind_Master spikes to millions of seconds10.4-MDEV-16091-merge
Problem:
========
A slave’s relay log format description event is used when
calculating Seconds_Behind_Master (SBM). This forces the SBM
value to spike when processing these events, as their creation
date is set to the timestamp that the IO thread begins.
Solution:
========
When the slave generates a format description event, mark the
event as a relay log event so it does not update the
rli->last_master_timestamp variable.
Reviewed By:
============
Andrei Elkin <andrei.elkin@mariadb.com>
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index c5a192d56d3..0f35d009a78 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3571,6 +3571,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, opt_slave_sql_verify_checksum ? (enum_binlog_checksum_alg) binlog_checksum_options : BINLOG_CHECKSUM_ALG_OFF; s.checksum_alg= relay_log_checksum_alg; + s.set_relay_log_event(); } else s.checksum_alg= (enum_binlog_checksum_alg)binlog_checksum_options; |