Commit 7d325ef2 authored by unknown's avatar unknown

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()
parent 90b102da
...@@ -695,6 +695,16 @@ MgmtSrvr::versionNode(int nodeId, Uint32 &version, const char **address) ...@@ -695,6 +695,16 @@ MgmtSrvr::versionNode(int nodeId, Uint32 &version, const char **address)
version= 0; version= 0;
if (getOwnNodeId() == nodeId) 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); sendVersionReq(nodeId, version, address);
version= NDB_VERSION; version= NDB_VERSION;
if(!*address) if(!*address)
......
...@@ -201,7 +201,13 @@ public: ...@@ -201,7 +201,13 @@ public:
~MgmtSrvr(); ~MgmtSrvr();
int status(int processId, /**
* 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, ndb_mgm_node_status * status,
Uint32 * version, Uint32 * version,
Uint32 * phase, Uint32 * phase,
......
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