Ask a Question related to MySQL, Design and Development.
-
Markus Wenke #1
Slave crash
Hi,
I use a simple Master-Slave-Replication with one Master and one Slave.(
MySQL 5.1.11-beta-log)
If I crash's the slave (Power off) while some INSERT's in a Transaction
are running, and restarts the slave after that, the slave don't start:
060901 8:57:27 [ERROR] Slave: Error 'Duplicate entry '85105' for key
'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO
TestTable (text) values ("Test: 1 257")', Error_code: 1062
060901 8:57:27 [Warning] Slave: Duplicate entry '85105' for key
'PRIMARY' Error_code: 1062
060901 8:57:27 [Warning] Slave: Unknown error Error_code: 1105
060901 8:57:27 [ERROR] Error running query, slave SQL thread aborted.
Fix the problem, and restart the slave SQL thread with "SLAVE START".
We stopped at log 'Master-bin.000008' position 3672742
I use "sync_binlog=1" on Master and Slave.
Is it a Problem because I use a "beta"-Version?
thanks in advance
Markus
Markus Wenke Guest
-
'stuck' slave?
Hi, I have a mysql slave database, that, for various reasons, got quite out of date with its master. Friday, when I left, it was happily... -
Traffic for Master/Slave
Hi! How much traffic does a master/slave configuration produce beyond the inserted/updated data? As to say: How much "meta"-traffic is to be... -
InDesign CS CE non-stop CRASH, CRASH, CRASH, CRASH, CRASH, CRASH
Sofware is orig., and OS is win2000 pro, or 2003 server or win2000 server. Any doc with litle more text crash indesign non-stop. With any updates... -
using slave flash units
I'm having to do some group family portraits indoors. I have three small slave flash units to use with the main flash on my slr. can anyone advise... -
Which flash slave to use?
A while back I posted here looking for recommendations regarding which optical slave to use. I ended up using a Nikon SU-4. It worked fine but all... -
Axel Schwenke #2
Re: Slave crash
"Markus Wenke" <M.Wenke@web.de> wrote:
This is a general replication problem. The slave keeps track of its>
> I use a simple Master-Slave-Replication with one Master and one Slave.(
> MySQL 5.1.11-beta-log)
>
> If I crash's the slave (Power off) while some INSERT's in a Transaction
> are running, and restarts the slave after that, the slave don't start:
> 060901 8:57:27 [ERROR] Slave: Error 'Duplicate entry '85105' for key
> 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO
> TestTable (text) values ("Test: 1 257")', Error_code: 1062
> 060901 8:57:27 [Warning] Slave: Duplicate entry '85105' for key
> 'PRIMARY' Error_code: 1062
> 060901 8:57:27 [Warning] Slave: Unknown error Error_code: 1105
> 060901 8:57:27 [ERROR] Error running query, slave SQL thread aborted.
> Fix the problem, and restart the slave SQL thread with "SLAVE START".
> We stopped at log 'Master-bin.000008' position 3672742
>
> I use "sync_binlog=1" on Master and Slave.
>
> Is it a Problem because I use a "beta"-Version?
current position in the binlog by writing the position to the files
'master.info' (I/O thread) and 'relay-log.info' (SQL thread).
However those files are not written synchronously.
If the slave experiences an unclean shutdown, chances are that the
real position of the slave in the binlog is behind the one recorded in
'relay-log.info'. In consequence the slave will do some statements
twice. If there are transactions, they may be done twice (as a whole).
This may lead to errors like above, or - even worse - to silent data
corruption.
So if your slave crashes hard, you better restore it from a backup.
Announcement: MySQL 5.1 introduces row based replication (RBR,
contrary to current statement based replication SBR). RBR replicates
the data of modified rows and thus avoids inconsistencies from certain
kinds of replication errors.
Example: with SBR the statement UPDATE foo SET bar=bar*2 WHERE baz=42
will lead to increasing inconsistency between master and slave if there
was a difference before or if this statement is executed twice on the
slave. With RBR master and slave will be in sync afterwards, no matter
what they were before.
XL
--
Axel Schwenke, Senior Software Developer, MySQL AB
Online User Manual: [url]http://dev.mysql.com/doc/refman/5.0/en/[/url]
MySQL User Forums: [url]http://forums.mysql.com/[/url]
Axel Schwenke Guest



Reply With Quote

