MySQL Forums
Forum List  »  Replication

Re: Got Fatal Error 1236 From Master Reading Data from binary log possibility to loose data/?
Posted by: Rick James
Date: April 17, 2013 08:51PM

> First data is written to the master table and then to bin log files.

There are 4 actions:

Write to the table on the Master.
Buffer up the write to the binlog.
Flush the buffer to the binlog. -- Controlled by sync_binlog
Send the query to the Slave(s).

There is a tiny chance that the query will get to the table but not to the slave, or will get to the slave but not to the table. (I don't know which.)

When sync_binlog=OFF, there is a _big_ chance that the binlog will be shorter than what the slave thinks it should be.

When the Slave-Master connection is reestablished, the Slave picks up where it left off. With sync_binlog=ON, that would be at the exact end of some binlog, and it would decide to move to the next binlog. The manual CHANGE MASTER simulates that.

If you are really concerned about lost data, see
http://www.percona.com/doc/percona-toolkit/2.2/pt-table-sync.html

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Got Fatal Error 1236 From Master Reading Data from binary log possibility to loose data/?
2078
April 17, 2013 08:51PM


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.