summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2005-09-22 21:55:10 +1000
committerunknown <stewart@mysql.com>2005-09-22 21:55:10 +1000
commit7d325ef2b3758d330420ca6e8c34abab42ef4b9e (patch)
treeb8ebcfbba864ef2490c78003e64e556210b44d82 /ndb
parent90b102daa644cf26de29ca88a82ae1a0fd45fff6 (diff)
downloadmariadb-git-7d325ef2b3758d330420ca6e8c34abab42ef4b9e.tar.gz
Add documentation about intricacies of MgmtSrvr::versionNode and ::status
ndb/src/mgmsrv/MgmtSrvr.cpp: Document why getOwnNodeID==nodeId is different in ::versionNode ndb/src/mgmsrv/MgmtSrvr.hpp: Document the usage of the address pointer returned from status()
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp10
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.hpp10
2 files changed, 18 insertions, 2 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index ccff959f260..3ee0dc6e750 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -695,6 +695,16 @@ MgmtSrvr::versionNode(int nodeId, Uint32 &version, const char **address)
version= 0;
if (getOwnNodeId() == nodeId)
{
+ /**
+ * If we're inquiring about our own node id,
+ * We know what version we are (version implies connected for mgm)
+ * but would like to find out from elsewhere what address they're using
+ * to connect to us. This means that secondary mgm servers
+ * can list ip addresses for mgm servers.
+ *
+ * If we don't get an address (i.e. no db nodes),
+ * we get the address from the configuration.
+ */
sendVersionReq(nodeId, version, address);
version= NDB_VERSION;
if(!*address)
diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp
index 8f16918b24a..927b610e75c 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.hpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.hpp
@@ -201,8 +201,14 @@ public:
~MgmtSrvr();
- int status(int processId,
- ndb_mgm_node_status * status,
+ /**
+ * Get status on a node.
+ * address may point to a common area (e.g. from inet_addr)
+ * There is no gaurentee that it is preserved across calls.
+ * Copy the string if you are not going to use it immediately.
+ */
+ int status(int nodeId,
+ ndb_mgm_node_status * status,
Uint32 * version,
Uint32 * phase,
bool * systemShutdown,