mirror of
https://github.com/MariaDB/server.git
synced 2026-04-25 01:35:31 +02:00
BUG#11516 ndb_mgmd debug core on cluster shutdown with failed data nodes
Fix closing of sessions on mgm server shutdown. ndb/include/mgmcommon/ConfigRetriever.hpp: Add disconnect(); ndb/src/common/mgmcommon/ConfigRetriever.cpp: Add disconnect() call so we can disconnect from the mgm server before it shuts down (if we are a mgm server). ndb/src/mgmsrv/main.cpp: Close our ConfigRetriever connection first. Stop sessions, and wait for them to stop. (previously we didn't wait, this was causing core dumps on shutdown with failed nodes).
This commit is contained in:
parent
98a3bae33d
commit
ab0e8f2e12
3 changed files with 9 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ public:
|
|||
~ConfigRetriever();
|
||||
|
||||
int do_connect(int no_retries, int retry_delay_in_seconds, int verbose);
|
||||
int disconnect();
|
||||
|
||||
/**
|
||||
* Get configuration for current node.
|
||||
|
|
|
|||
|
|
@ -107,6 +107,12 @@ ConfigRetriever::do_connect(int no_retries,
|
|||
0 : -1;
|
||||
}
|
||||
|
||||
int
|
||||
ConfigRetriever::disconnect()
|
||||
{
|
||||
return ndb_mgm_disconnect(m_handle);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
//****************************************************************************
|
||||
//****************************************************************************
|
||||
|
|
|
|||
|
|
@ -353,7 +353,8 @@ int main(int argc, char** argv)
|
|||
|
||||
g_eventLogger.info("Shutting down server...");
|
||||
glob.socketServer->stopServer();
|
||||
glob.socketServer->stopSessions();
|
||||
glob.mgmObject->get_config_retriever()->disconnect();
|
||||
glob.socketServer->stopSessions(true);
|
||||
g_eventLogger.info("Shutdown complete");
|
||||
return 0;
|
||||
error_end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue