This is a nasty one...
We are trying to setup replication with MySQL. Previously, we setup our transaction isolation level to 'READ COMMITTED' as per our requirements. It turns out that replication will crash the slave at this isolation level. I'm not talking about mysqld giving an error, I'm referring to a full blown CRASH!
Specifically, replication will work fine if I only insert into the db, but the slave will crash if I tried to delete from the db. Worst yet, if MySQL was started using mysqld_safe, it will try to re-start mysqld after a crash. At that point, mysqld will crash again because it will try to execute the delete statement again. This becomes an infinite loop and the log files will start filling until you run out of space.
So the lesson here is this: set your transaction isolation level to REPEATABLE READ or higher if you are using replication with innodb. The specific MySQL version was 5.1.22rc and 5.1.23rc.
Saturday, March 8, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment