List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 8 2011 11:51am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4508 to 4509)
View as plain text  
 4509 Jonas Oreland	2011-09-08
      ndb - fix newly introduced bug, where ACC memory didn't get divided with no of LDM threads

    modified:
      storage/ndb/src/kernel/ndbd.cpp
      storage/ndb/src/kernel/vm/Configuration.cpp
 4508 Frazer Clement	2011-09-07
      WL5353 Primary Cluster conflict resolution - transactional
      
       - A new --ndb-log-transaction-id option is added to the MySQL Server
       - A new NDB$EPOCH_TRANS() conflict detection algorithm is added
       - Five new status variables for tracking the behaviour of transactional 
         conflict detection.
      
      The NDB$EPOCH_TRANS() function is similar to NDB$EPOCH, except that 
      detected conflicts result in rejection and realignment of not just the
      conflicting rows, but their transactions, and any transactions 
      transitively depending on them.  This gives eventually consistent 
      asynchronous replication with cross-row transaction consistency.
      
       

    added:
      mysql-test/suite/ndb_binlog/r/ndb_binlog_log_transaction_id.result
      mysql-test/suite/ndb_binlog/t/ndb_binlog_get_row_extra_data.inc
      mysql-test/suite/ndb_binlog/t/ndb_binlog_log_transaction_id-master.opt
      mysql-test/suite/ndb_binlog/t/ndb_binlog_log_transaction_id.test
      mysql-test/suite/ndb_rpl/r/ndb_rpl_conflict_epoch_trans.result
      mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch_trans.cnf
      mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch_trans.test
      mysql-test/suite/ndb_rpl/t/ndb_trans_conflict_info.inc
      mysql-test/suite/ndb_rpl/t/ndb_trans_conflict_info_init.inc
      mysql-test/suite/ndb_rpl/t/ndb_trans_conflict_info_stable.inc
      mysql-test/suite/rpl/r/rpl_extra_row_data.result
      mysql-test/suite/rpl/t/rpl_extra_row_data-master.opt
      mysql-test/suite/rpl/t/rpl_extra_row_data-slave.opt
      mysql-test/suite/rpl/t/rpl_extra_row_data.test
      sql/ndb_conflict_trans.cc
      sql/ndb_conflict_trans.h
      storage/ndb/include/util/HashMap2.hpp
      storage/ndb/include/util/LinkedStack.hpp
      storage/ndb/src/common/util/HashMap2.cpp
      storage/ndb/src/common/util/LinkedStack.cpp
    modified:
      libmysqld/Makefile.am
      mysql-test/suite/ndb/r/ndb_basic.result
      sql/Makefile.am
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_binlog.h
      sql/log_event.cc
      sql/log_event.h
      sql/ndb_mi.cc
      sql/ndb_mi.h
      sql/rpl_constants.h
      sql/slave.h
      sql/sql_class.cc
      sql/sql_class.h
      storage/ndb/CMakeLists.txt
      storage/ndb/src/common/util/CMakeLists.txt
      storage/ndb/src/common/util/Makefile.am
=== modified file 'storage/ndb/src/kernel/ndbd.cpp'
--- a/storage/ndb/src/kernel/ndbd.cpp	2011-08-30 12:00:48 +0000
+++ b/storage/ndb/src/kernel/ndbd.cpp	2011-09-08 11:49:24 +0000
@@ -296,7 +296,6 @@ static int
 get_multithreaded_config(EmulatorData& ed)
 {
   // multithreaded is compiled in ndbd/ndbmtd for now
-  globalData.isNdbMt = SimulatedBlock::isMultiThreaded();
   if (!globalData.isNdbMt)
   {
     ndbout << "NDBMT: non-mt" << endl;
@@ -304,58 +303,15 @@ get_multithreaded_config(EmulatorData& e
   }
 
   THRConfig & conf = ed.theConfiguration->m_thr_config;
-
   Uint32 threadcount = conf.getThreadCount();
   ndbout << "NDBMT: MaxNoOfExecutionThreads=" << threadcount << endl;
 
-  globalData.isNdbMtLqh = true;
-
-  {
-    if (conf.getMtClassic())
-    {
-      globalData.isNdbMtLqh = false;
-    }
-  }
-
   if (!globalData.isNdbMtLqh)
     return 0;
 
-  Uint32 threads = conf.getThreadCount(THRConfig::T_LDM);
-  Uint32 workers = threads;
-  {
-    ndb_mgm_configuration * conf = ed.theConfiguration->getClusterConfig();
-    if (conf == 0)
-    {
-      abort();
-    }
-    ndb_mgm_configuration_iterator * p =
-      ndb_mgm_create_configuration_iterator(conf, CFG_SECTION_NODE);
-    if (ndb_mgm_find(p, CFG_NODE_ID, globalData.ownId))
-    {
-      abort();
-    }
-    ndb_mgm_get_int_parameter(p, CFG_NDBMT_LQH_WORKERS, &workers);
-  }
-
-#ifdef VM_TRACE
-  // testing
-  {
-    const char* p;
-    p = NdbEnv_GetEnv("NDBMT_LQH_WORKERS", (char*)0, 0);
-    if (p != 0)
-      workers = atoi(p);
-  }
-#endif
-
-  ndbout << "NDBMT: workers=" << workers
-         << " threads=" << threads << endl;
-
-  assert(workers != 0 && workers <= MAX_NDBMT_LQH_WORKERS);
-  assert(threads != 0 && threads <= MAX_NDBMT_LQH_THREADS);
-  assert(workers % threads == 0);
+  ndbout << "NDBMT: workers=" << globalData.ndbMtLqhWorkers
+         << " threads=" << globalData.ndbMtLqhThreads << endl;
 
-  globalData.ndbMtLqhWorkers = workers;
-  globalData.ndbMtLqhThreads = threads;
   return 0;
 }
 

=== modified file 'storage/ndb/src/kernel/vm/Configuration.cpp'
--- a/storage/ndb/src/kernel/vm/Configuration.cpp	2011-09-02 17:24:52 +0000
+++ b/storage/ndb/src/kernel/vm/Configuration.cpp	2011-09-08 11:49:24 +0000
@@ -457,6 +457,46 @@ Configuration::setupConfiguration(){
   m_clusterConfigIter = ndb_mgm_create_configuration_iterator
     (p, CFG_SECTION_NODE);
 
+  /**
+   * This is parts of get_multithreaded_config
+   */
+  do
+  {
+    globalData.isNdbMt = NdbIsMultiThreaded();
+    globalData.isNdbMtLqh = true;
+    {
+      if (m_thr_config.getMtClassic())
+      {
+        globalData.isNdbMtLqh = false;
+      }
+    }
+
+    if (!globalData.isNdbMtLqh)
+      break;
+
+    Uint32 threads = m_thr_config.getThreadCount(THRConfig::T_LDM);
+    Uint32 workers = threads;
+    iter.get(CFG_NDBMT_LQH_WORKERS, &workers);
+
+#ifdef VM_TRACE
+    // testing
+    {
+      const char* p;
+      p = NdbEnv_GetEnv("NDBMT_LQH_WORKERS", (char*)0, 0);
+      if (p != 0)
+        workers = atoi(p);
+    }
+#endif
+
+
+    assert(workers != 0 && workers <= MAX_NDBMT_LQH_WORKERS);
+    assert(threads != 0 && threads <= MAX_NDBMT_LQH_THREADS);
+    assert(workers % threads == 0);
+
+    globalData.ndbMtLqhWorkers = workers;
+    globalData.ndbMtLqhThreads = threads;
+  } while (0);
+
   calcSizeAlt(cf);
 
   DBUG_VOID_RETURN;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4508 to 4509) Jonas Oreland8 Sep