• 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
ConfigRetriever.hpp 2.91 KB