youtube/vitess — pull request #145 by enisoc (2014-11-07 01:28:44+00:00)
Title: Expand lock to avoid race in RebuildShard.

@alainjobart

Lock before reading topo, to prevent another rebuild from writing
fresher data that could then be overwritten with stale data by a slow
rebuild.