MySQL Forums
Forum List  »  Replication

Read & Exec Master Log Position on Master-Master setup
Posted by: Bubba Jones
Date: September 22, 2005 07:45PM

I have 2 development servers:
- Fedora Core 2 (2.6.10-1.771_FC2)
- 1.5 G memory
- MySQL: 4.1.12-Max-log, using innodb tables

I've set up a master-master configuration (M01 & M02) so each master is a slave of the other database.
(I only do writes on one master)

The problem is that the "Read_Master_Log_Pos" and "Exec_Master_Log_Pos" show they are not in sync when I do a "show slave status\G"

When I initialize both masters (restarting slaves on both) and then doing this query on a master (M01)
mysql> insert into testaf(object_id, object_title) values (1, 'mysql rules');
(table testaf shown below)

- the M01 "show slave status" shows a difference between the "Read_Master_Log_Pos" (=8722) and "Exec_Master_Log_Pos" (=8619) of 103
- the M02 "show slave status" shows 0 difference
- the data on M01 and M02 is the same
- no errors in the error log on M01 or M02
- mysqlbinlog shows the same transactions on M01 and M02 in the binlog
- if I run the same query on M02, the Exec_Master_Log_Pos and Read_Master_Log_Pos on M02 show a difference of 103, but the difference of 103 on M01 dissapears
- restarting the slave on M01 or M02 will put both systems back in sync again

mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: M02
Master_User: replica
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: M02-bin.000008
Read_Master_Log_Pos: 8722 **
Relay_Log_File: M01-relay-bin.000005
Relay_Log_Pos: 7749
Relay_Master_Log_File: M02-bin.000008
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 8619 **
Relay_Log_Space: 7749
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0

This is my first master-master setup, and before I put it into production mode I would like to know:
- how to fix this (besides restarting the slave every 5 hours)
- is this really a problem that Read & Exec Master Log Position is different? The data is all there.


* mysql> explain testaf;
+--------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+-------+
| object_id | int(11) | YES | | NULL | |
| object_title | varchar(64) | YES | | NULL | |
+--------------+-------------+------+-----+---------+-------+

Thanks in advance,
Bubba

Options: ReplyQuote


Subject
Views
Written By
Posted
Read & Exec Master Log Position on Master-Master setup
7567
September 22, 2005 07:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.