List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 23 2010 11:30am
Subject:bzr commit into mysql-5.1-telco-7.1 branch (jonas:3988)
View as plain text  
#At file:///home/jonas/src/telco-7.1/ based on revid:magnus.blaudd@stripped

 3988 Jonas Oreland	2010-11-23 [merge]
      ndb merge 70 to 71

    modified:
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/mgmsrv/ConfigInfo.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2010-10-25 18:35:08 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2010-11-22 14:27:12 +0000
@@ -1714,6 +1714,17 @@ void Dbdih::execNDB_STTOR(Signal* signal
     break;
   case ZNDB_SPH5:
     jam();
+    if (m_gcp_monitor.m_micro_gcp.m_max_lag > 0)
+    {
+      infoEvent("GCP Monitor: Computed max GCP_SAVE lag to %u seconds",
+                m_gcp_monitor.m_gcp_save.m_max_lag / 10);
+      infoEvent("GCP Monitor: Computed max GCP_COMMIT lag to %u seconds",
+                m_gcp_monitor.m_micro_gcp.m_max_lag / 10);
+    }
+    else
+    {
+      infoEvent("GCP Monitor: unlimited lags allowed");
+    }
     switch(typestart){
     case NodeState::ST_INITIAL_START:
     case NodeState::ST_SYSTEM_RESTART:
@@ -5850,6 +5861,17 @@ void Dbdih::MASTER_GCPhandling(Signal* s
 
   m_micro_gcp.m_master.m_start_time = 0;
   m_gcp_save.m_master.m_start_time = 0;
+  if (m_gcp_monitor.m_micro_gcp.m_max_lag > 0)
+  {
+    infoEvent("GCP Monitor: Computed max GCP_SAVE lag to %u seconds",
+              m_gcp_monitor.m_gcp_save.m_max_lag / 10);
+    infoEvent("GCP Monitor: Computed max GCP_COMMIT lag to %u seconds",
+              m_gcp_monitor.m_micro_gcp.m_max_lag / 10);
+  }
+  else
+  {
+    infoEvent("GCP Monitor: unlimited lags allowed");
+  }
 
   bool ok = false;
   switch(m_micro_gcp.m_master.m_state){
@@ -13947,11 +13969,29 @@ void Dbdih::checkGcpStopLab(Signal* sign
   if (m_gcp_monitor.m_gcp_save.m_gci == m_gcp_save.m_gci)
   {
     jam();
-    if (cnt0 == m_gcp_monitor.m_gcp_save.m_max_lag)
+    if (m_gcp_monitor.m_gcp_save.m_max_lag && 
+        cnt0 == m_gcp_monitor.m_gcp_save.m_max_lag)
     {
       crashSystemAtGcpStop(signal, false);
       return;
     }
+
+    Uint32 threshold = 60; // seconds
+    if (cnt0 && ((cnt0 % (threshold * 10)) == 0))
+    {
+      if (m_gcp_monitor.m_gcp_save.m_max_lag)
+      {
+        warningEvent("GCP Monitor: GCP_SAVE lag %u seconds"
+                     " (max lag: %us)",
+                     cnt0/10, m_gcp_monitor.m_gcp_save.m_max_lag/10);
+      }
+      else
+      {
+        warningEvent("GCP Monitor: GCP_SAVE lag %u seconds"
+                     " (no max lag)",
+                     cnt0/10);
+      }
+    }
   }
   else
   {
@@ -13967,11 +14007,28 @@ void Dbdih::checkGcpStopLab(Signal* sign
       m_gcp_monitor.m_micro_gcp.m_max_lag :
       m_gcp_monitor.m_gcp_save.m_max_lag;
     
-    if (cnt1 == cmp)
+    if (cmp && cnt1 == cmp)
     {
       crashSystemAtGcpStop(signal, false);
       return;
     }
+
+    Uint32 threshold = 10; // seconds
+    if (cnt1 && ((cnt0 % (threshold * 10)) == 0))
+    {
+      if (m_gcp_monitor.m_micro_gcp.m_max_lag)
+      {
+        warningEvent("GCP Monitor: GCP_COMMIT lag %u seconds"
+                     " (max lag: %u)",
+                     cnt1/10, m_gcp_monitor.m_micro_gcp.m_max_lag/10);
+      }
+      else
+      {
+        warningEvent("GCP Monitor: GCP_COMMIT lag %u seconds"
+                     " (no max lag)",
+                     cnt1/10);
+      }
+    }
   }
   else
   {
@@ -14932,9 +14989,19 @@ void Dbdih::initCommonData()
     { // Set time-between epochs timeout
       Uint32 tmp = 4000;
       ndb_mgm_get_int_parameter(p, CFG_DB_MICRO_GCP_TIMEOUT, &tmp);
-      tmp += max_failure_time;
-      m_gcp_monitor.m_micro_gcp.m_max_lag = 
-        (m_micro_gcp.m_master.m_time_between_gcp + tmp) / 100;
+      if (tmp != 0)
+      {
+        jam();
+        tmp += max_failure_time;
+        m_gcp_monitor.m_micro_gcp.m_max_lag = 
+          (m_micro_gcp.m_master.m_time_between_gcp + tmp) / 100;
+      }
+      else
+      {
+        jam();
+        m_gcp_monitor.m_gcp_save.m_max_lag = 0;
+        m_gcp_monitor.m_micro_gcp.m_max_lag = 0;
+      }
     }
   }
 }//Dbdih::initCommonData()

=== modified file 'storage/ndb/src/mgmsrv/ConfigInfo.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2010-10-28 13:24:21 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2010-11-22 14:27:12 +0000
@@ -1038,7 +1038,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
     ConfigInfo::CI_INT,
     "4000",
     "0",
-    "32000" },
+    "256000" },
 
   {
     CFG_DB_MAX_BUFFERED_EPOCHS,

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.1 branch (jonas:3988) Jonas Oreland23 Nov