Alexey Serbin has uploaded a new patch set (#2).

Change subject: [mini_cluster] fix crash in GetLeaderMasterIndex()
......................................................................

[mini_cluster] fix crash in GetLeaderMasterIndex()

If at least one of the mini-masters is shutdown by explicit call
of the MiniMaster::Shutdown() method, the subsequent call of
MiniCluster::GetLeaderMasterIndex() crashes while trying to access
the underlying Master object.  That's because the shared_ptr wrapper
has been reset by prior call of the MiniMaster::Shutdown() call.

This patch adds a check for the presence of the Master object in the
wrapper prior to call of Master::Shutdown().

Besides, added a way to specify no placeholder for the
index parameter for MiniCluster::GetLeaderMasterIndex().  That's
for the use case when it's necessary to wait for the master
to be established in the mini-cluster with no intent to get its index.

Change-Id: Icbb64ee44e22b5f32a2351e0e1289826a8485c84
---
M src/kudu/integration-tests/mini_cluster.cc
M src/kudu/master/mini_master.h
2 files changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/70/5870/2
-- 
To view, visit http://gerrit.cloudera.org:8080/5870
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Icbb64ee44e22b5f32a2351e0e1289826a8485c84
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to