MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:April 15 2009 2:50pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:2909) Bug#44294
View as plain text  
#At file:///home/jonas/src/64-upgrade/ based on revid:jonas@stripped

 2909 Jonas Oreland	2009-04-15
      ndb - bug#44294 - part VI
        Don't simply exit() on config-check-ref
        But allow peer/own node to be in CS_INITIAL, and in these case instead
        just ignore it

    M  storage/ndb/src/mgmsrv/ConfigManager.cpp
=== modified file 'storage/ndb/src/mgmsrv/ConfigManager.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigManager.cpp	2009-04-15 14:38:12 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigManager.cpp	2009-04-15 14:50:06 +0000
@@ -1331,6 +1331,7 @@ ConfigManager::execCONFIG_CHECK_REQ(Sign
                        nodeId, generation, other_generation,
                        m_config_state, other_state);
 
+
   switch (m_config_state)
   {
   default:
@@ -1342,8 +1343,14 @@ ConfigManager::execCONFIG_CHECK_REQ(Sign
   case CS_INITIAL:
     if (other_state != CS_INITIAL)
     {
-      g_eventLogger->error("Other node are not in INITIAL");
-      exit(1);
+      g_eventLogger->warning("Refusing CONGIG_CHECK_REQ from %u, "
+                             "  it's not CS_INITIAL (I am). "
+                             " Waiting for my check",
+                             nodeId);
+      sendConfigCheckRef(ss, from, ConfigCheckRef::WrongState,
+                         generation, other_generation,
+                         m_config_state, other_state);
+      return;
     }
 
     require(generation == 0);
@@ -1490,14 +1497,30 @@ ConfigManager::execCONFIG_CHECK_REF(Sign
   const ConfigCheckRef* const ref =
     CAST_CONSTPTR(ConfigCheckRef, sig->getDataPtr());
 
-  g_eventLogger->error("Got CONFIG_CHECK_REF from node %d, "   \
-                       "error: %d, message: '%s'\n"            \
-                       "generation: %d, expected generation: %d\n"\
-                       "state: %d, expected state: %d",
-                       nodeId, ref->error,
-                       ConfigCheckRef::errorMessage(ref->error),
-                       ref->generation, ref->expected_generation,
-                       ref->state, ref->expected_state);
+  g_eventLogger->info("Got CONFIG_CHECK_REF from node %d, "
+                      "error: %d, message: '%s'\n"
+                      "generation: %d, expected generation: %d\n"
+                      "state: %d, expected state: %d own-state: %u",
+                      nodeId, ref->error,
+                      ConfigCheckRef::errorMessage(ref->error),
+                      ref->generation, ref->expected_generation,
+                      ref->state, ref->expected_state,
+                      m_config_state);
+  
+  if (m_config_state != CS_INITIAL &&
+      ref->expected_state == CS_INITIAL)
+  {
+    g_eventLogger->info("Waiting for peer");
+    return;
+  }
+
+  if (m_config_state == CS_INITIAL)
+  {
+    g_eventLogger->info("Waiting");
+    return;
+  }
+  
+  g_eventLogger->info("Terminating");
   exit(1);
 }
 


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090415145006-tyy3tuau3kdx5r58.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:2909) Bug#44294Jonas Oreland15 Apr