Bug #29516 SELECT statements against the merlin repository increase over time
Submitted: 3 Jul 2007 13:35 Modified: 10 Jul 2007 8:55
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S2 (Serious)
Version:1.2.0 OS:Any
Assigned to: Eric Herman CPU Architecture:Any

[3 Jul 2007 13:35] Mark Leith
Description:
SELECT statements against the merlin repository are increasing over time, adding around ~1000 statements per minute incrementally, per hour. 

The SELECT statements have been tracked down to the 'Known Item' queries:

[root@net-sup1 mleith]# ./mysqlsla --general general.log --sort c --filter -*,+SELECT 
Allowed SQL statements: SELECT 
Reading general log 'general.log'.
1163114 total queries, 68 unique.
Sorting by 'c'.

__ 001 _______________________________________________________________________

Count         : 495117 (42%)
Database      : merlin

SELECT COUNT(*) FROM dc_known_items WHERE item_id=N AND agent_id=N 

__ 002 _______________________________________________________________________

Count         : 225358 (19%)
Database      : merlin

SELECT item_id FROM dc_known_items WHERE agent_id=N 

__ 003 _______________________________________________________________________

Count         : 179048 (15%)
Database      : merlin

SELECT dc_schedule.collect_id FROM dc_schedule WHERE item_id=N AND instance='S' AND server_id=N 

It is not clear yet whether this is due to the replication monitoring or not.

How to repeat:
o Set up a service manager, with an agent monitoring it.
o Add a number of agents monitoring replication.
o Leave the service manager and agents alone, and observe the 'Database Activity' graph
[3 Jul 2007 15:32] Eric Herman
(1) svn r6373 should fix fundamental bug
(2) also we now make better use of our pre-existing caches
[10 Jul 2007 8:55] Mark Leith
Verified fixed in 1.2.0.6501 (and before)