• unknown's avatar
    Use the mgm connection used for fetching configuration as a transporter. · b2985fc5
    unknown authored
    
    ndb/include/mgmapi/mgmapi.h:
      Add mgmapi call: ndb_mgm_get_mgmd_nodeid()
      
      - returns the node id that the handle is connected to.
      - returns 0 on error.
    ndb/include/transporter/TransporterRegistry.hpp:
      Add TransporterRegistry::connect_client(NdbMgmHandle h)
       - uses a connected NdbMgmHandle to connect to the mgm server as a client.
       - sets up a transporter connection
       - used to transform the initial mgm connection (used for fetching configuration)
         into a transporter connection
      
      Added connect_ndb_mgmd(NdbMgmHandle h)
       - turn the supplied mgm connection into a transporter connection
       - return the socket
      
      Improve comments on connect_ndb_mgmd(SocketClient)
    ndb/src/common/transporter/Transporter.cpp:
      Add Transporter::connect_client(NDB_SOCKET_TYPE)
       - use an existing socket to make a transporter connection
    ndb/src/common/transporter/Transporter.hpp:
      Add connect_client(NDB_SOCKET_TYPE)
    ndb/src/common/transporter/TransporterRegistry.cpp:
      Add TransporterRegistry::connect_client(NdbMgmHandle)
       - use an existing mgm connection to connect a transporter
       - used to change the mgm connection used for fetching configuration into a transporter
      
      Add connect_ndb_mgmd(NdbMgmHandle)
       - use existing NdbMgmHandle
       - convert to transporter
       - return socket
    ndb/src/kernel/vm/Configuration.cpp:
      After fetching configuration, use the mgm connection as a transporter.
      Fail fatally if this fails.
    ndb/src/mgmapi/mgmapi.cpp:
      Add ndb_mgm_get_mgmd_nodeid(h)
       - returns the node id of the mgm server you're connected to.
    ndb/src/mgmsrv/Services.cpp:
      Add "get mgmd nodeid" mgmd call
      
      returns 'nodeid' - the node id of the mgm server your connected to
    ndb/src/mgmsrv/Services.hpp:
      add prototype for get_mgmd_nodeid
    b2985fc5
Transporter.hpp 4.02 KB