Adar Dembo has uploaded a new patch set (#2).

Change subject: ts_itest-base.h: wait for bootstrapping to finish when waiting 
for replicas

ts_itest-base.h: wait for bootstrapping to finish when waiting for replicas

WaitForReplicasAndUpdateLocations() is called by many itests during test
setup. The context is almost always the same:
1. Start a mini cluster, waiting for all tservers to heartbeat.
2. Create a client.
3. Create a table using the client, waiting for table creation to finish.
4. Using WaitForReplicasAndUpdateLocations(), create a tablet to tserver
   multimap via direct GetTableLocations() RPCs.
5. Send RPCs directly to specific tablets using the map built in step 4.

Today's implementation of GetTableLocations() also guarantees that step #4
only completes when all replicas have finished bootstrapping. I have a patch
outstanding that removes that guarantee. Why? Because it's not terribly
useful outside of testing (a tserver can restart at any time, so clients
must always be prepared for TABLET_NOT_RUNNING responses) and because it
simplifies master state. To keep these itests working, we need to find
another way to provide the guarantee.

So here's the fix: use ExternalMiniCluster::WaitForTabletsRunning() to
ensure that all tablets on every server are actually running. But first we
must augment it to wait for a specific tablet count, otherwise it may return
despite a tserver working on a slow CreateTablet() RPC.

Change-Id: I116e0bd8ec9d7abbe830d1d0ea4e35465d990a28
M src/kudu/integration-tests/
M src/kudu/integration-tests/
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/ts_itest-base.h
M src/kudu/integration-tests/
5 files changed, 50 insertions(+), 14 deletions(-)

  git pull ssh:// refs/changes/08/3308/2
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I116e0bd8ec9d7abbe830d1d0ea4e35465d990a28
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <>
Gerrit-Reviewer: Adar Dembo <>
Gerrit-Reviewer: Todd Lipcon <>

Reply via email to