I'm running a 4 servers master-master cluster of MySql. (2 servers version 5.1, and 2 version 5.5)
While checking the slave status, i see the seconds_behind_master at 0, and half a second after i see it jumps to 2000, and so fourth.
What could it possibly be? How can i debug it?
Replication topology: 1 -> 2 -> 3 -> 4 -> 1
It seems that server 3 has its SBM at 0, while the other servers are jumping up and down. Does that help?
UPDATE 2 It seems that the issue is with server 1. When creating a test table in server 4, checking the relay log in server 1 shows the create statement was copied to the relay log in server 1 instantly, but the table is not created. It looks like the server is busy doing something, and there is a huge delay between when the server gets the statement, and when it executes it.
UPDATE 3 The same thing happens on server 4.
UPDATE 4 Ok i found the issue. Servers 1 2 & 4 were having "invalidating query cache entries (table)" stuck in their replication thread. After disabling cache, server 4 is ok but 1&2 are still having this issue.
It looks like a common bug: http://bugs.mysql.com/bug.php?id=60696
If anyone knows how to fix it, i would be glad to hear