tumblr/jetpants — pull request #11 by eelias (2013-02-28 00:09:13+00:00)
Title: Use command-line options instead of my.cnf overrides

Deprecate DB#disable_binary_logging and DB#enable_binary_logging, which have to mess with /etc/my.cnf, which is brittle. Instead supply command-line options to DB#start_mysql and DB#restart_mysql as appropriate.

This also lets us use --innodb-autoinc-lock-mode=2, in order to allow chunked import of tables even with auto_increment columns.

This change does introduce some subtle alterations of the shard split logic. Previously, Shard#split would disable binary logging in my.cnf but then not restart mysql immediately; it would rely on the node being restarted as part of the enslave_siblings call. We now need to do an explicit restart instead, prior to import time, to ensure passing in the right command-line options. But this also means we need to restart with --skip-slave-start to ensure we don't start replicating any statements after exporting the dataset but before re-importing any of it!

I'll review this a bit more tomorrow and then will merge.