Commit f8f7110a authored by unknown's avatar unknown

Fixed hanging ndb_mgmd on various platforms

Move init of node-init-mutex to before alloc node id


ndb/src/mgmsrv/MgmtSrvr.cpp:
  Move init of node-init-mutex to before alloc node id
parent facda8f3
...@@ -480,6 +480,13 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId, ...@@ -480,6 +480,13 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId,
_ownNodeId= 0; _ownNodeId= 0;
NodeId tmp= nodeId; NodeId tmp= nodeId;
BaseString error_string; BaseString error_string;
if ((m_node_id_mutex = NdbMutex_Create()) == 0)
{
ndbout << "mutex creation failed line = " << __LINE__ << endl;
exit(-1);
}
#if 0 #if 0
char my_hostname[256]; char my_hostname[256];
struct sockaddr_in tmp_addr; struct sockaddr_in tmp_addr;
...@@ -512,7 +519,6 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId, ...@@ -512,7 +519,6 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId,
#endif #endif
_ownNodeId = tmp; _ownNodeId = tmp;
{ {
DBUG_PRINT("info", ("verifyConfig")); DBUG_PRINT("info", ("verifyConfig"));
ConfigRetriever cr(m_local_config, NDB_VERSION, NDB_MGM_NODE_TYPE_MGM); ConfigRetriever cr(m_local_config, NDB_VERSION, NDB_MGM_NODE_TYPE_MGM);
...@@ -534,12 +540,6 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId, ...@@ -534,12 +540,6 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId,
m_statisticsListner.m_logLevel = se.m_logLevel; m_statisticsListner.m_logLevel = se.m_logLevel;
} }
if ((m_node_id_mutex = NdbMutex_Create()) == 0)
{
ndbout << "mutex creation failed line = " << __LINE__ << endl;
exit(-1);
}
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment