mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
make sure that the "conections are up to date" when exiting from MgmtSrvr::transporter_connect()
Make sure that the node itself is set in the m_connected_nodes when connected ndb/src/kernel/vm/Configuration.cpp: make sure we destroy the iterator before reusing the variable ndb/src/mgmsrv/MgmtSrvr.cpp: make sure that the "conections are up to date" when exiting from MgmtSrvr::transporter_connect() ndb/src/ndbapi/ClusterMgr.cpp: Make sure that the node itself is set in the m_connected_nodes when connected
This commit is contained in:
parent
c24523c87f
commit
114487dd08
3 changed files with 22 additions and 2 deletions
|
@ -154,6 +154,7 @@ Configuration::Configuration()
|
||||||
_daemonMode = false;
|
_daemonMode = false;
|
||||||
m_config_retriever= 0;
|
m_config_retriever= 0;
|
||||||
m_clusterConfig= 0;
|
m_clusterConfig= 0;
|
||||||
|
m_clusterConfigIter= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Configuration::~Configuration(){
|
Configuration::~Configuration(){
|
||||||
|
@ -363,6 +364,8 @@ Configuration::setupConfiguration(){
|
||||||
|
|
||||||
ConfigValues* cf = ConfigValuesFactory::extractCurrentSection(iter.m_config);
|
ConfigValues* cf = ConfigValuesFactory::extractCurrentSection(iter.m_config);
|
||||||
|
|
||||||
|
if(m_clusterConfigIter)
|
||||||
|
ndb_mgm_destroy_iterator(m_clusterConfigIter);
|
||||||
m_clusterConfigIter = ndb_mgm_create_configuration_iterator
|
m_clusterConfigIter = ndb_mgm_create_configuration_iterator
|
||||||
(p, CFG_SECTION_NODE);
|
(p, CFG_SECTION_NODE);
|
||||||
|
|
||||||
|
|
|
@ -2909,7 +2909,18 @@ MgmtSrvr::getConnectionDbParameter(int node1,
|
||||||
|
|
||||||
void MgmtSrvr::transporter_connect(NDB_SOCKET_TYPE sockfd)
|
void MgmtSrvr::transporter_connect(NDB_SOCKET_TYPE sockfd)
|
||||||
{
|
{
|
||||||
theFacade->get_registry()->connect_server(sockfd);
|
if (theFacade->get_registry()->connect_server(sockfd))
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Force an update_connections() so that the
|
||||||
|
* ClusterMgr and TransporterFacade is up to date
|
||||||
|
* with the new connection.
|
||||||
|
* Important for correct node id reservation handling
|
||||||
|
*/
|
||||||
|
NdbMutex_Lock(theFacade->theMutexPtr);
|
||||||
|
theFacade->get_registry()->update_connections();
|
||||||
|
NdbMutex_Unlock(theFacade->theMutexPtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int MgmtSrvr::set_connect_string(const char *str)
|
int MgmtSrvr::set_connect_string(const char *str)
|
||||||
|
|
|
@ -410,7 +410,13 @@ ClusterMgr::reportConnected(NodeId nodeId){
|
||||||
theNode.connected = true;
|
theNode.connected = true;
|
||||||
theNode.hbSent = 0;
|
theNode.hbSent = 0;
|
||||||
theNode.hbCounter = 0;
|
theNode.hbCounter = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* make sure the node itself is marked connected even
|
||||||
|
* if first API_REGCONF has not arrived
|
||||||
|
*/
|
||||||
|
theNode.m_state.m_connected_nodes.set(nodeId);
|
||||||
|
|
||||||
if (theNode.m_info.m_type != NodeInfo::REP) {
|
if (theNode.m_info.m_type != NodeInfo::REP) {
|
||||||
theNode.hbFrequency = 0;
|
theNode.hbFrequency = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue