List:Commits« Previous MessageNext Message »
From:tomas Date:December 13 2007 8:31pm
Subject:bk commit into 5.0 tree (tomas:1.2578) BUG#33168
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-13 21:31:38+01:00, tomas@stripped +2 -0
  Bug #33168 Incorrectly handled parameters can make the TC crash during node failure
  - during commit deadlock timeout needs to be at least 5 times db hearbeat

  ndb/src/kernel/blocks/dbtc/Dbtc.hpp@stripped, 2007-12-13 21:31:36+01:00, tomas@stripped +1 -0
    Bug #33168 Incorrectly handled parameters can make the TC crash during node failure
    - during commit deadlock timeout needs to be at least 5 times db hearbeat

  ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2007-12-13 21:31:36+01:00, tomas@stripped +13 -4
    Bug #33168 Incorrectly handled parameters can make the TC crash during node failure
    - during commit deadlock timeout needs to be at least 5 times db hearbeat

diff -Nrup a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
--- a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2007-12-06 17:15:10 +01:00
+++ b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2007-12-13 21:31:36 +01:00
@@ -1674,6 +1674,7 @@ private:
   UintR cfailure_nr;
   UintR coperationsize;
   UintR ctcTimer;
+  UintR cDbHbInterval;
 
   ApiConnectRecordPtr tmpApiConnectptr;
   UintR tcheckGcpId;
diff -Nrup a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2007-12-07 10:33:45 +01:00
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2007-12-13 21:31:36 +01:00
@@ -643,6 +643,10 @@ void Dbtc::execREAD_CONFIG_REQ(Signal* s
   ndb_mgm_get_int_parameter(p, CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT, &val);
   set_timeout_value(val);
 
+  val = 1500;
+  ndb_mgm_get_int_parameter(p, CFG_DB_HEARTBEAT_INTERVAL, &val);
+  cDbHbInterval = (val < 10) ? 10 : val;
+
   val = 3000;
   ndb_mgm_get_int_parameter(p, CFG_DB_TRANSACTION_INACTIVE_TIMEOUT, &val);
   set_appl_timeout_value(val);
@@ -6390,6 +6394,7 @@ void Dbtc::timeOutFoundLab(Signal* signa
     // conditions should get us here. We ignore it.
     /*------------------------------------------------------------------*/
   case CS_PREPARE_TO_COMMIT:
+  {
     jam();
     /*------------------------------------------------------------------*/
     /*       WE ARE WAITING FOR DIH TO COMMIT THE TRANSACTION. WE SIMPLY*/
@@ -6398,12 +6403,16 @@ void Dbtc::timeOutFoundLab(Signal* signa
     // To ensure against strange bugs we crash the system if we have passed
     // time-out period by a factor of 10 and it is also at least 5 seconds.
     /*------------------------------------------------------------------*/
-    if (((ctcTimer - getApiConTimer(apiConnectptr.i)) > (10 * ctimeOutValue)) &&
-        ((ctcTimer - getApiConTimer(apiConnectptr.i)) > 500)) {
-        jam();
-        systemErrorLab(signal, __LINE__);
+    Uint32 time_passed = ctcTimer - getApiConTimer(apiConnectptr.i);
+    if (time_passed > 500 &&
+        time_passed > (5 * cDbHbInterval) &&
+        time_passed > (10 * ctimeOutValue))
+    {
+      jam();
+      systemErrorLab(signal, __LINE__);
     }//if
     break;
+  }
   case CS_COMMIT_SENT:
     jam();
     /*------------------------------------------------------------------*/
Thread
bk commit into 5.0 tree (tomas:1.2578) BUG#33168tomas13 Dec