List:Commits« Previous MessageNext Message »
From:jonas Date:February 10 2008 1:06pm
Subject:bk commit into 5.1 tree (jonas:1.2874) BUG#34445
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas.  When jonas 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, 2008-02-10 13:06:21+01:00, jonas@stripped +3 -0
  ndb - bug#34445
    Incorrectly dimensioned pool, could cause cluster-failure when doing
    more than 3 parallel take-overs (node restart or take-over during system restart)
  
    Move usage of getParam into separate function (called by BLOCK_CONSTRUCTOR) so that 
      it's called on correct block

  storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp@stripped, 2008-02-10 13:06:19+01:00,
jonas@stripped +1 -1
    set correct pool size

  storage/ndb/src/kernel/vm/SimulatedBlock.cpp@stripped, 2008-02-10 13:06:19+01:00,
jonas@stripped +24 -34
    move initialization of misc pools to own function, so they can be called by resp.
block-constructor

  storage/ndb/src/kernel/vm/SimulatedBlock.hpp@stripped, 2008-02-10 13:06:19+01:00,
jonas@stripped +3 -1
    move initialization of misc pools to own function, so they can be called by resp.
block-constructor

diff -Nrup a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
--- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp	2007-12-23 13:52:21 +01:00
+++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp	2008-02-10 13:06:19 +01:00
@@ -207,7 +207,7 @@ DbUtil::execREAD_CONFIG_REQ(Signal* sign
   }
 
   c_lockQueuePool.setSize(5);
-  c_lockElementPool.setSize(5);
+  c_lockElementPool.setSize(4*MAX_NDB_NODES);
   c_lockQueues.setSize(8);
 
   ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend();
diff -Nrup a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp
b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp	2007-12-23 13:52:21 +01:00
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp	2008-02-10 13:06:19 +01:00
@@ -69,40 +69,6 @@ SimulatedBlock::SimulatedBlock(BlockNumb
   c_fragmentIdCounter = 1;
   c_fragSenderRunning = false;
   
-  Properties tmp;
-  const Properties * p = &tmp;
-  ndbrequire(p != 0);
-
-  Uint32 count = 10;
-  char buf[255];
-
-  count = 10;
-  BaseString::snprintf(buf, 255, "%s.FragmentSendPool", getBlockName(blockNumber));
-  if(!p->get(buf, &count))
-    p->get("FragmentSendPool", &count);
-  c_fragmentSendPool.setSize(count);
-
-  count = 10;
-  BaseString::snprintf(buf, 255, "%s.FragmentInfoPool", getBlockName(blockNumber));
-  if(!p->get(buf, &count))
-    p->get("FragmentInfoPool", &count);
-  c_fragmentInfoPool.setSize(count);
-
-  count = 10;
-  BaseString::snprintf(buf, 255, "%s.FragmentInfoHash", getBlockName(blockNumber));
-  if(!p->get(buf, &count))
-    p->get("FragmentInfoHash", &count);
-  c_fragmentInfoHash.setSize(count);
-
-  count = 5;
-  BaseString::snprintf(buf, 255, "%s.ActiveMutexes", getBlockName(blockNumber));
-  if(!p->get(buf, &count))
-    if (!this->getParam("ActiveMutexes", &count))
-      p->get("ActiveMutexes", &count);
-  c_mutexMgr.setSize(count);
-  
-  c_counterMgr.setSize(5);
-  
 #ifdef VM_TRACE_TIME
   clearTimes();
 #endif
@@ -119,6 +85,30 @@ SimulatedBlock::SimulatedBlock(BlockNumb
   m_global_variables = new Ptr<void> * [1];
   m_global_variables[0] = 0;
 #endif
+}
+
+void
+SimulatedBlock::initCommon()
+{
+  Uint32 count = 10;
+  this->getParam("FragmentSendPool", &count);
+  c_fragmentSendPool.setSize(count);
+
+  count = 10;
+  this->getParam("FragmentInfoPool", &count);
+  c_fragmentInfoPool.setSize(count);
+
+  count = 10;
+  this->getParam("FragmentInfoHash", &count);
+  c_fragmentInfoHash.setSize(count);
+
+  count = 5;
+  this->getParam("ActiveMutexes", &count);
+  c_mutexMgr.setSize(count);
+  
+  count = 5;
+  this->getParam("ActiveCounters", &count);
+  c_counterMgr.setSize(count);
 }
 
 SimulatedBlock::~SimulatedBlock()
diff -Nrup a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp
b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2007-12-23 13:52:21 +01:00
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2008-02-10 13:06:19 +01:00
@@ -117,6 +117,8 @@ protected:
   void addRecSignalImpl(GlobalSignalNumber g, ExecFunction fun, bool f =false);
   void installSimulatedBlockFunctions();
   ExecFunction theExecArray[MAX_GSN+1];
+
+  void initCommon();
 public:
   /**
    * 
@@ -844,7 +846,7 @@ public:\
 private: \
   void addRecSignal(GlobalSignalNumber gsn, ExecSignalLocal f, bool force = false)
 
-#define BLOCK_CONSTRUCTOR(BLOCK)
+#define BLOCK_CONSTRUCTOR(BLOCK) do { SimulatedBlock::initCommon(); } while(0)
 
 #define BLOCK_FUNCTIONS(BLOCK) \
 void \
Thread
bk commit into 5.1 tree (jonas:1.2874) BUG#34445jonas10 Feb