Attila Bukor has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/20913 )

Change subject: KUDU-3491 Destruct master before creating a new one
......................................................................

KUDU-3491 Destruct master before creating a new one

ServerBase constructor runs MinidumpExceptionHandler constructor that
calls RegisterMinidumpExceptionHandler(). This function increments the
static atomic variable current_num_instances_. Then the ServerBase is
destructed, a similar process happens and current_num_instances_ gets
decremented. If current_num_instances_ is not zero before incrementing
or not 1 before decrementing, then it is considered an error. This
indicates that only one Server can run at any given time. But in case of
multi-master config, the master server is replaced, and without the
change it is possible that the second server's constructor precede first
server's destructor. This change makes it sure that the destructor is
executed before the second one's constructor.

Change-Id: I3c1019d092bbf9e58f4fc33753a1218bc79735d3
Reviewed-on: http://gerrit.cloudera.org:8080/20913
Reviewed-by: Attila Bukor <[email protected]>
Reviewed-by: Mahesh Reddy <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/master/dynamic_multi_master-test.cc
M src/kudu/master/master_runner.cc
2 files changed, 43 insertions(+), 2 deletions(-)

Approvals:
  Attila Bukor: Looks good to me, approved
  Mahesh Reddy: Looks good to me, but someone else must approve
  Kudu Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/20913
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3c1019d092bbf9e58f4fc33753a1218bc79735d3
Gerrit-Change-Number: 20913
Gerrit-PatchSet: 8
Gerrit-Owner: Ádám Bakai <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Ádám Bakai <[email protected]>

Reply via email to