Bug #29737 Agent runs SHOW MASTER|SLAVE STATUS once for each column in output
Submitted: 11 Jul 2007 19:40 Modified: 9 Aug 2007 3:09
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S2 (Serious)
Version: OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any
Tags: mer 120

[11 Jul 2007 19:40] Mark Leith
Description:
Currently the SHOW SLAVE STATUS and SHOW MASTER STATUS commands are run once for each column / data collection item we collect from them within the agent. 

We should cache the output and share it between all of the data collections instead. 

How to repeat:
o Set up a replication environment, 1 master, 1 slave
o Turn on general query log for the slave
o Set 1.2 monitoring and agents against both instances
o See the SHOW SLAVE STATUS get executed many times per second every minute

Suggested fix:
Cache as we do with SHOW GLOBAL STATUS
[7 Aug 2007 21:42] Sloan Childers
per Leith:  the fact that we don't read show slave/master status in one shot can lead to binary position out of synch issues

per Mark:  that's bad conceptually too (just not performance), because there's no read stability/transactions on metadata
[8 Aug 2007 14:37] Jan Kneschke
a generic result-cache has been committed in [6965]
[9 Aug 2007 3:09] Bill Weber
Verified SHOW SLAVE STATUS is now only called once a minute in build 1.2.0.6993.