binary log position on two masters problem

153 views
Skip to first unread message

sissi

unread,
Jul 21, 2011, 5:53:16 AM7/21/11
to MySQL Multi Master Manager Development
Hi guys,

please help!

we are using MMM recently, master1 is active master, master2 is
passive master, when we start using master-master replication mode,
the binary log files on each master is different, also the position in
the "mysql>show master status;" is different.

For example:
master1 master2
File:mysql_bin.00xxxx File:mysql_bin.000xxx
Position:645747655 Position:102830217

Both he 'File' and 'Position' are quite different.

Then for some reasons, i repaired tables on the passive master, so the
repair operation also replicated to the active master, then i found
the binary logs position became the same on each master and now always
keep the same between two masters.

like say:
master1 master2
File:mysql_bin.001052 File:mysql_bin.000104
Position:645747655 Position:645747655

any problems? is it just coincidence?

Regards,

sissi

Manuel Arostegui Ramirez

unread,
Jul 24, 2011, 6:49:14 AM7/24/11
to mmm-...@googlegroups.com


2011/7/21 sissi <siss...@gmail.com>
Hi Sissi, 

Are you writing to both masters at the same time? Or just master1 which replicates to master2? 

sissi

unread,
Jul 24, 2011, 8:56:05 PM7/24/11
to MySQL Multi Master Manager Development
Hi Manuel,

Thanks for reply.

we only write to master1,but only did repair tables command ont time
on master2.

-sissi



On Jul 24, 6:49 pm, Manuel Arostegui Ramirez
<manuel.todoli...@gmail.com> wrote:
> 2011/7/21 sissi <sissi...@gmail.com>

Manuel Arostegui Ramirez

unread,
Jul 25, 2011, 2:48:23 AM7/25/11
to mmm-...@googlegroups.com


2011/7/25 sissi <siss...@gmail.com>

Hi Manuel,

Thanks for reply.

we only write to master1,but only did repair tables command ont time
on master2.

-sissi

Hey Sissi, 

In that case, master2 binlog should only go forward if you have enabled "log-slave-updates" on it.
So, you can confirm that if in master2 you do: "show master status\G"
Then do a write into master1, and then again "show master status\G" in master2...the position has changed?

If so...you have either enabled "log-slaves-updates" or worse...you're writing to master2 directly and that's why its binlog is going forward.
Make sure you have master2 with read-only=ON

Cheers
Manu

sissi

unread,
Jul 25, 2011, 6:24:35 AM7/25/11
to MySQL Multi Master Manager Development
Hi Manu,

I'm sure both masters have enabled 'log-slave-updates', and master is
set read_only.

because i used 'root' user to repair tables on master2, so read_only
did not work.so far i have no problem.

my point is the position of both masters' binlog are the same now
'645747655',and now write operations keeps coming into master 1, the
binlog position on both masters are keeping going forward, they are
always the same value now.

Is it just coincidence? i'm quite worried about it.

Help!

Regards,

sissi


On Jul 25, 2:48 pm, Manuel Arostegui Ramirez
<manuel.todoli...@gmail.com> wrote:
> 2011/7/25 sissi <sissi...@gmail.com>

Manuel Arostegui Ramirez

unread,
Jul 25, 2011, 6:46:19 AM7/25/11
to mmm-...@googlegroups.com


2011/7/25 sissi <siss...@gmail.com>

Hi Manu,

I'm sure both masters have enabled 'log-slave-updates', and master is
set read_only.

because i used 'root' user to repair tables on master2, so read_only
did not work.so far i have no problem.

my point is the position of both masters' binlog are the same now
'645747655',and now write operations keeps coming into master 1, the
binlog position on both masters are keeping going forward, they are
always the same value now.

Is it just coincidence? i'm quite worried about it.

Hey Sissi

If both have the log-slave-updates enabled, it explains why they are both going forward at the same time. I'd say it's just coincidence.
You can run a consistency check to make sure you're having no data differences between them.

Manu

sissi

unread,
Jul 25, 2011, 7:19:41 AM7/25/11
to MySQL Multi Master Manager Development
Hi Manu ,

Thanks very much!

now i'm relieved, for checking consistency what tool do you use?
maatkit?

Regards,
sissi

On Jul 25, 6:46 pm, Manuel Arostegui Ramirez
<manuel.todoli...@gmail.com> wrote:
> 2011/7/25 sissi <sissi...@gmail.com>
>

Manuel Arostegui Ramirez

unread,
Jul 25, 2011, 8:30:31 AM7/25/11
to mmm-...@googlegroups.com


2011/7/25 sissi <siss...@gmail.com>

Hi Manu ,

Thanks very much!

now i'm relieved, for checking consistency what tool do you use?
maatkit?



Hey, 


Cheers!
Manu 
Reply all
Reply to author
Forward
0 new messages