1. 24 Feb, 2005 1 commit
    • unknown's avatar
      Fixes for: use initial mgm connection as transporter connection · 9bc6ed86
      unknown authored
      
      ndb/include/mgmapi/mgmapi.h:
        ndb_mgm_convert_to_transporter may destroy the handle, now takes a pointer.
      ndb/include/mgmcommon/ConfigRetriever.hpp:
        If outside code is going to manipulate the NdbMgmHandle, allow it to do it
        via a get_mgmHandlePtr() call
      ndb/include/transporter/TransporterRegistry.hpp:
        connect_client and connect_ndb_mgmd may destroy the handle, now they take a pointer.
      ndb/src/common/transporter/TransporterRegistry.cpp:
        When start_service is binding to ports, report back the port numbers.
        
        We need this here now, as we re-use the initial mgm connection as a transporter, which
        is connected *before* start_service has allocated the dynamic port numbers. So the creation
        of this early transporter cannot be used to send the dynamic ports to the mgmd.
        
        We connect to the mgm server (using the handle that will be used in the client_Connect thread)
        if needed. This is thread safe as start_service is only ever called once, before
        the client connect thread starts.
        
        connect_client,connect_ndb_mgmd may destroy the NdbMgmHandle. It now accepts a pointer to it.
      ndb/src/kernel/vm/Configuration.cpp:
        Copy the m_mgmd_host string from the config_retreiver as the NdbMgmHandle in the
        ConfigRetreiver will be destroyed later (along with the host string).
        
        globalTransporterRegistry.connect_client will destroy the mgm handle, use a pointer to the handle.
      ndb/src/kernel/vm/Configuration.hpp:
        allow the dynamic allocation of m_mgmd_host.
      ndb/src/mgmapi/mgmapi.cpp:
        accept a pointer for ndb_mgm_convert_to_transporter as we destroy the handle.
      9bc6ed86
  2. 23 Feb, 2005 1 commit
    • unknown's avatar
      Use the mgm connection used for fetching configuration as a transporter. · bb5a2f28
      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
      bb5a2f28
  3. 22 Feb, 2005 12 commits
  4. 21 Feb, 2005 26 commits