Skip to content
  • Ole John's avatar
    d8314d9f
    Bug#23343673 POTENTIAL DEADLOCK WHEN SHUTTING DOWN NDBCLUSTER BEFORE CONNECTED · d8314d9f
    Ole John authored
    Bugs fixed:
     - There is a potential problem when mysqld waits for the ndb-handler
       components to be initialized. While waiting for connection
       to the ndb_mgmd we are not able to shutdown the mysqld, and might
       get stuck here forever if not able to make a ndb_mgmd connection.
    
     - Make the code more resilient by changing from infinite
       condition wait to a 1 second condition wait. This improves the
       chances that util thread and index stat thread will detect deinit
       and terminate themself properly.
    
     - The Ndb_cluster_connection_impl::connect_thread, which wait
       for the above ndb_mgmd connection, does *two* NdbSleep_SecSleep(1)'s
       instead if a singe as intended to.
    
    Related cleanup:
     - Refactor the ndb-connection-wait into the new function
       ndbcluster_is_connected() and change it to use the (new)
       ndbcluster_cond instead of the Ndb_util_thread.COND.
       (ndbcluster_cond actually replace/rename COND_ndb_setup_complete)
    
    -  The above refactoring allowed us to remove the global
       'extern' decl of ndb_util_thread, and make its COND
       and LOCK members 'private'
    
     - Refactor 'extern' decl. of variables related to above work
       by moving them from various *.cc files into a common *.h decl.
    d8314d9f
    Bug#23343673 POTENTIAL DEADLOCK WHEN SHUTTING DOWN NDBCLUSTER BEFORE CONNECTED
    Ole John authored
    Bugs fixed:
     - There is a potential problem when mysqld waits for the ndb-handler
       components to be initialized. While waiting for connection
       to the ndb_mgmd we are not able to shutdown the mysqld, and might
       get stuck here forever if not able to make a ndb_mgmd connection.
    
     - Make the code more resilient by changing from infinite
       condition wait to a 1 second condition wait. This improves the
       chances that util thread and index stat thread will detect deinit
       and terminate themself properly.
    
     - The Ndb_cluster_connection_impl::connect_thread, which wait
       for the above ndb_mgmd connection, does *two* NdbSleep_SecSleep(1)'s
       instead if a singe as intended to.
    
    Related cleanup:
     - Refactor the ndb-connection-wait into the new function
       ndbcluster_is_connected() and change it to use the (new)
       ndbcluster_cond instead of the Ndb_util_thread.COND.
       (ndbcluster_cond actually replace/rename COND_ndb_setup_complete)
    
    -  The above refactoring allowed us to remove the global
       'extern' decl of ndb_util_thread, and make its COND
       and LOCK members 'private'
    
     - Refactor 'extern' decl. of variables related to above work
       by moving them from various *.cc files into a common *.h decl.
Loading