Todd Lipcon has submitted this change and it was merged.

Change subject: master: additional leader lock assertions in catalog manager

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
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <>
M src/kudu/client/
M src/kudu/integration-tests/
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/
M src/kudu/integration-tests/
M src/kudu/integration-tests/mini_cluster.h
M src/kudu/integration-tests/
M src/kudu/master/
M src/kudu/master/catalog_manager.h
M src/kudu/master/
10 files changed, 155 insertions(+), 109 deletions(-)

  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bb2f5067cdbdd93900a80255def65a26216f6ea
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <>
Gerrit-Reviewer: Adar Dembo <>
Gerrit-Reviewer: Dan Burkert <>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <>

Reply via email to