diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-04-30 19:48:11 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-05-03 11:21:55 +0200 |
commit | f875c9f2a090f98ba9d9e881165b4cf71cd6a8a2 (patch) | |
tree | 6b773c01b2591f368898f293bdfd77d15653910e /sql/rpl_rli.h | |
parent | e6d918cacba8c5f3b002c4eb0244f44c3c941818 (diff) | |
download | mariadb-git-f875c9f2a090f98ba9d9e881165b4cf71cd6a8a2.tar.gz |
MDEV-5114 seconds_behind_master flips to 0 & spikes back, when running show slaves status
1. After a period of wait (where last_master_timestamp=0)
do NOT restore the last_master_timestamp to the timestamp
of the last executed event (which would mean we've just
executed it, and we're that much behind the master).
2. Update last_master_timestamp before executing the event,
not after.
Take the approach from the this commit (but with a different test
case that actually makes sense):
commit 0c75ab453fb8c5439576af8fe5add7a1b89f1569
Author: Luis Soares <luis.soares@sun.com>
Date: Thu Apr 15 17:39:31 2010 +0100
BUG#52166: Seconds_Behind_Master spikes after long idle period
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r-- | sql/rpl_rli.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 84a4aa93cd3..2d92f384ef3 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -415,15 +415,8 @@ public: Master log position of the event. The position is recorded in the relay log info and used to produce information for <code>SHOW SLAVE STATUS</code>. - - @param event_creation_time - Timestamp for the creation of the event on the master side. The - time stamp is recorded in the relay log info and used to compute - the <code>Seconds_behind_master</code> field. */ - void stmt_done(my_off_t event_log_pos, - time_t event_creation_time, THD *thd, - rpl_group_info *rgi); + void stmt_done(my_off_t event_log_pos, THD *thd, rpl_group_info *rgi); int alloc_inuse_relaylog(const char *name); void free_inuse_relaylog(inuse_relaylog *ir); void reset_inuse_relaylog(); |