MySQL Master-Master Replication Delays

71 views
Skip to first unread message

amir ali

unread,
Nov 2, 2012, 1:20:50 PM11/2/12
to percona-d...@googlegroups.com
Hello,

I am running master-master bidirectional replication (active-active) topology.
Master 1 has server_id 1 while Master 2 has server_id 2 and remaining config parameters are same as below.

replicate-same-server-id=0
slave-compressed-protocol=1
log-slave-updates

Issue is i noticed huge replication delay on Master1 when replicating from Master2.
One of my cronjob inserted million of rows around 4 million (3GB binlog size) on Master1 and all data get replicated to Master2 OK.
In between my app inserted some data on Master 2 which is not viisible on Master1 when i checked slave status on Master1 i noticed huge replication delay.
Master1 scanning the logs of Master2 for the data which is already inserted on Master1 via cronjob. i.e. my assumption is when Master1 notice it's own server_id on Master2 binlog it should skip all binlog event with Master1 server_id (server_id = 1) quickly. But somehow it's traversing Master2 binlog event one by one and to me it look likes it will traverse all events of Master2 binlog.
I thought Master1 should only scan Master2 binlog events which has written with Master2 server_id i.e. with server_id = 2.
My question is traversing every binlog event despite of server_id is normally or i hit some kind of bug.

Both of the MySQL server's has version MySQL 5.1

Hui Liu

unread,
Nov 4, 2012, 11:50:07 PM11/4/12
to percona-d...@googlegroups.com
As I understand from the source code level, it's designed that all the events would be transferred back to M1 for these binlogs replicated to M2 from M1, but they would be skipped and not be written to relay log, due to the it's own server_id exactly the same with the binlog events.



--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To post to this group, send email to percona-d...@googlegroups.com.
 
 

Reply all
Reply to author
Forward
0 new messages