Bug #94847 | Seconds_Behind_Master jumps to a huge number and return 0 with a idle Master | ||
---|---|---|---|
Submitted: | 1 Apr 2019 4:04 | Modified: | 5 Apr 2019 1:37 |
Reporter: | Wang Wen'an | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.7.23 | OS: | Debian (Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64) |
Assigned to: | MySQL Verification Team | CPU Architecture: | x86 |
Tags: | replication, Seconds_Behind_Master |
[1 Apr 2019 4:04]
Wang Wen'an
[1 Apr 2019 13:42]
MySQL Verification Team
Hi, Do you have regular replication where A is master and B is slave or you have master-master circular replication? kind regards Bogdan
[2 Apr 2019 2:20]
Wang Wen'an
Hi, Fot the two questions : Do you have regular replication where A is master and B is slave? Yes, A(Master) has Insert/Update/Delete, and B(Standby) sets log_slave_update = ON, so B(Standby) has binlog rotate without any user connections. You have master-master circular replication? No, these two MySQL instances keep the same UUID after udpated from 5.7.12, and erverything is OK in 5.7.12.
[2 Apr 2019 14:24]
MySQL Verification Team
Hi, if A is a master and you don't have circular replication, where does the "Seconds_behind_Master on A" comes from? Why is "show slave status" showing anything on A ?! I think this is not a bug but you need to contact support team to review your setup. If you think otherwise please describe properly your setup and the problem. kind regards Bogdan
[2 Apr 2019 14:24]
MySQL Verification Team
furthermore, did you run mysql_upgrade after upgrading?
[3 Apr 2019 8:19]
Wang Wen'an
Hi, Maybe I misunderstand the "circular replication". Our structure is A<-->B, a Master-Master structure, both A and B are Master and Slave, but only A have Insert/Update/Delete. B is used as Standby and will accept user connections when A is down. mysql_upgrade was ran after upgrading correctly.
[4 Apr 2019 12:14]
MySQL Verification Team
Hi, > Maybe I misunderstand the "circular replication". Our structure is A<-->B, a Master-Master structure, both A and B are Master and Slave Yes, that is circular replication. I was not able to reproduce your problem. Did upgrade from 5.7.12 to 5.7.25, ran a circular replication with a high load on single node and have not notice slave "lagging" on that node. You might want to turn on full log on your "standby" server to check if there are any queries executed there. kind regards Bogdan
[5 Apr 2019 1:37]
Wang Wen'an
Hi, Load on A(Master) is low, nearly 2000 qps and 3 average load in Linux. GTID of B(Standby) is not changed, but I will check the general log later. What's more, I have tried to change multi-thread-replication to single-thread-replication by only setting slave_parallel_work to 0 yesterday, the SBM looks normally. But MTR is necessary, so I changed back after several hours and DBM jumps again.