Adding a mutex lock in an extra place to make thread sanitizer happy.
Merge branch 'master' into replication
Merge branch 'master' of https://github.com/youtube/vitess