apache /
kudu /
cf009d431bd8c2bf936ba1a2a246c91bc6dc5675 master: additional leader lock assertions in catalog manager
I went through the catalog manager entry points and added leader lock
assertions where necessary, updating tests as needed.
I also snuck in a couple cluster fixes:
1. MiniCluster::leader_mini_master() was unsafe because it didn't pass the
(now held) leader lock back to the caller. It's only used in a few places
though, so I removed it outright rather than fix it.
2. WaitForTabletServerCount() has been updated for both kinds of clusters.
The new version waits for the correct count on every master, a necessary
change now that tservers heartbeat to every master. Without this, we may
stop waiting when the master that has seen all tservers was a follower
and fail a subsequent CreateTable. The new version also ignore masters
that have been shut down. This isn't essential, but good future-proofing.
Change-Id: I5bb2f5067cdbdd93900a80255def65a26216f6ea
Reviewed-on: http://gerrit.cloudera.org:8080/3684
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>
10 files changed