soundcloud/large-hadron-migrator — comment on commit c79bd93830f8fb67e1a6b3a0a6a69a65caa4f8ed
File:  line 0
By grobie:

@tiegz You're right, the large hadron migrator gem (prior to version `1.0`) used a journal table to collect all changes happening during the migration. This concept has been consolidated to a trigger-only approach where the triggers update rows directly on the destination/new table.

As @lgierth already pointed out, the switching is not atomic and there is a very small time window after the first `ALTER TABLE xxx RENAME lhma_xxx` where applications don't see the table at all. The longest gap we have seen so far lasted for 2 seconds. In case you're using percona server `>= 5.5` or any other mysql server version which is not affected by [this bug](http://bugs.mysql.com/bug.php?id=39675), you could change the locked switcher to use a simple, atomic `RENAME TABLE ...` statement. We plan to add an option to choose the switch strategy with one of the next releases.