summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2005-03-04 09:55:16 +0100
committertomas@poseidon.ndb.mysql.com <>2005-03-04 09:55:16 +0100
commitd360786e454fdf57b6b44ba31eb05a7732ee657b (patch)
tree7f56b88373cff1e28cfddcebf1fd06f5b95f95e1 /ndb
parent358ba900ef270f5bb941155580623fcb443ac2c0 (diff)
downloadmariadb-git-d360786e454fdf57b6b44ba31eb05a7732ee657b.tar.gz
get connected nodes correct earlier for correct node id allocation
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp4
-rw-r--r--ndb/src/ndbapi/ClusterMgr.cpp4
2 files changed, 7 insertions, 1 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index e915216c793..28b53acf9c3 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -55,6 +55,7 @@
#include <mgmapi_configuration.hpp>
#include <mgmapi_config_parameters.h>
#include <m_string.h>
+#include <Transporter.hpp>
//#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG
@@ -2138,9 +2139,10 @@ MgmtSrvr::get_connected_nodes(NodeBitmask &connected_nodes) const
if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB)
{
const ClusterMgr::Node &node= theFacade->theClusterMgr->getNodeInfo(i);
- if (node.connected)
+ if (theFacade->get_registry()->get_transporter(i)->isConnected())
{
connected_nodes.bitOR(node.m_state.m_connected_nodes);
+ connected_nodes.set(i);
}
}
}
diff --git a/ndb/src/ndbapi/ClusterMgr.cpp b/ndb/src/ndbapi/ClusterMgr.cpp
index 183cb6488f8..71938e27037 100644
--- a/ndb/src/ndbapi/ClusterMgr.cpp
+++ b/ndb/src/ndbapi/ClusterMgr.cpp
@@ -260,6 +260,7 @@ ClusterMgr::Node::Node()
: m_state(NodeState::SL_NOTHING) {
compatible = nfCompleteRep = true;
connected = defined = m_alive = false;
+ m_state.m_connected_nodes.clear();
}
/******************************************************************************
@@ -434,6 +435,9 @@ ClusterMgr::reportDisconnected(NodeId nodeId){
noOfConnectedNodes--;
theNodes[nodeId].connected = false;
+
+ theNodes[nodeId].m_state.m_connected_nodes.clear();
+
reportNodeFailed(nodeId);
}