List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:December 21 2010 10:22am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4070)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4070 Jonas Oreland	2010-12-21
      ndb - push interpretation of TimeBetweenLocalCheckpoints down to LQH
        This effectivly removes need of TCGETOPSIZEREQ/TC_CLOPSIZEREQ (but they are kept)

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-12-04 11:20:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-12-21 10:21:57 +0000
@@ -1310,13 +1310,33 @@ void Dblqh::execREAD_CONFIG_REQ(Signal* 
     ndbrequire(cmaxLogFilesInPageZero);
   }
 
-  Uint64 totalmb = Uint64(cnoLogFiles) * Uint64(clogFileSize);
-  Uint64 limit = totalmb / 3;
-  ndbrequire(limit < Uint64(0xFFFFFFFF));
-  // If less than 33% of REDO free, force LCP
-  c_free_mb_force_lcp_limit = Uint32(limit); 
-  c_free_mb_tail_problem_limit = 4;  // If less than 4Mb set TAIL_PROBLEM
+  {
+    Uint32 config_val = 20;
+    ndb_mgm_get_int_parameter(p, CFG_DB_LCP_INTERVAL, &config_val);
+    config_val = config_val > 31 ? 31 : config_val;
+
+    const Uint32 mb = 1024 * 1024;
+    
+    // perform LCP after this amout of mbytes written
+    const Uint64 config_mbytes = ((Uint64(4) << config_val) + mb - 1) / mb;
+    const Uint64 totalmb = Uint64(cnoLogFiles) * Uint64(clogFileSize);
+    if (totalmb > config_mbytes)
+    {
+      c_free_mb_force_lcp_limit = totalmb - config_mbytes;
+    }
+    else
+    {
+      c_free_mb_force_lcp_limit = 0;
+    }
 
+    // No less than 33%
+    Uint32 limit = Uint32(totalmb / 3);
+    if (c_free_mb_force_lcp_limit < limit)
+    {
+      c_free_mb_force_lcp_limit = limit;
+    }
+  }
+  c_free_mb_tail_problem_limit = 4;  // If less than 4Mb set TAIL_PROBLEM
 
   ndb_mgm_get_int_parameter(p, CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT, 
                             &cTransactionDeadlockDetectionTimeout);


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101221102157-9iadf47sfey04qvm.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4070) Jonas Oreland21 Dec