youtube/vitess — pull request #153 by aaijazi (2014-11-12 04:02:34+00:00)
Title: writeMastersOnly strategy for split_clone workers

Primary reviewer: @alainjobart

WIP for implementing the writeMastersOnly strategy. Spent a while mucking around to make the tests pass...

Anyways, this is an early review to "show my work". Still a few things left to do, in order:

1. Change the unit tests to not be so hacky. I want to add a new test case instead of modifying the old one (so we'll have something like TestSplitCloneWriteAll and TestSplitCloneWriteMastersOnly)
2. Look at integration test coverage and add tests there for the new strategy
3. Improve findTargets so that it just reads the global Shard record instead of doing FindAllTabletAliasesInShard and then filtering that down to masters.
4. Improve exception handling so that we retry on failed master queries, after re-resolving the topology

3 and 4 are important, but I'm leaving them until the end because I think we don't actually need those features as soon as the rest