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

 3688 Jonas Oreland	2010-12-21 [merge]
      ndb - merge with 70-tip

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/ndbapi/Ndbif.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-12-20 12:57:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-12-21 10:28:58 +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);

=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp	2010-12-18 08:36:08 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp	2010-12-20 12:54:39 +0000
@@ -1251,9 +1251,9 @@ Remark:   First send all prepared operat
 void	
 Ndb::sendPreparedTransactions(int forceSend)
 {
-  theImpl->m_transporter_facade->lock_mutex();
+  theImpl->lock();
   sendPrepTrans(forceSend);
-  theImpl->m_transporter_facade->unlock_mutex();
+  theImpl->unlock();
   return;
 }//Ndb::sendPreparedTransactions()
 

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.0-llcp branch (jonas:3688) Jonas Oreland21 Dec