List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:February 2 2012 9:21pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (jonas.oreland:3804 to 3805)
View as plain text  
 3805 Jonas Oreland	2012-02-02 [merge]
      ndb - merge 71 to 72

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.hpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.hpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp
      storage/ndb/src/mgmsrv/ConfigInfo.cpp
 3804 Jonas Oreland	2012-02-02 [merge]
      ndb - merge 71 to 72

    modified:
      storage/ndb/include/kernel/ndb_limits.h
      storage/ndb/src/kernel/vm/SimulatedBlock.hpp
      storage/ndb/src/kernel/vm/mt.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.cpp	2011-11-16 05:47:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.cpp	2012-02-02 21:00:28 +0000
@@ -50,16 +50,6 @@ NdbLogPartInfo::partNoOwner(Uint32 lpno)
   return partMask.get(lpno);
 }
 
-bool
-NdbLogPartInfo::partNoOwner(Uint32 tabId, Uint32 fragId)
-{
-  Uint32 instanceKey = SimulatedBlock::getInstanceKey(tabId, fragId);
-  assert(instanceKey != 0);
-  Uint32 lpid = instanceKey - 1;
-  Uint32 lpno = partNoFromId(lpid);
-  return partNoOwner(lpno);
-}
-
 Uint32
 NdbLogPartInfo::partNoIndex(Uint32 lpno) const
 {
@@ -74,10 +64,3 @@ NdbLogPartInfo::partNoIndex(Uint32 lpno)
   assert(partNo[i] == lpno);
   return i;
 }
-
-Uint32
-NdbLogPartInfo::instanceKey(Uint32 lpno) const
-{
-  assert(lpno < LogParts);
-  return 1 + lpno;
-}

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.hpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.hpp	2011-11-16 05:47:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.hpp	2012-02-02 21:00:28 +0000
@@ -30,10 +30,6 @@
  *
  *   log part number = log part id % 4
  *
- * Currently instance key (1-4) is
- *
- *   instance key = 1 + log part number
- *
  * This may change, and the code (except this file) must not assume
  * any connection between log part number and instance key.
  *
@@ -49,9 +45,7 @@ struct NdbLogPartInfo {
   Bitmask<(NDB_MAX_LOG_PARTS+31)/32> partMask;
   Uint32 partNoFromId(Uint32 lpid) const;
   bool partNoOwner(Uint32 lpno) const;
-  bool partNoOwner(Uint32 tabId, Uint32 fragId);
   Uint32 partNoIndex(Uint32 lpno) const;
-  Uint32 instanceKey(Uint32 lpno) const;
 };
 
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2012-01-25 14:33:12 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2012-02-02 21:00:28 +0000
@@ -1244,12 +1244,13 @@ void Dblqh::execREAD_CONFIG_REQ(Signal*
 
   if (globalData.ndbLogParts != 4 &&
       globalData.ndbLogParts != 8 &&
+      globalData.ndbLogParts != 12 &&
       globalData.ndbLogParts != 16)
   {
     char buf[255];
     BaseString::snprintf(buf, sizeof(buf),
       "Trying to start with %d log parts, number of log parts can"
-      " only be set to 4, 8 or 16.",
+      " only be set to 4, 8, 12 or 16.",
       globalData.ndbLogParts);
     progError(__LINE__, NDBD_EXIT_INVALID_CONFIG, buf);
   }
@@ -1912,7 +1913,7 @@ void Dblqh::execLQHFRAGREQ(Signal* signa
     ndbrequire(ptr.p->logPartNo == logPartNo);
 
     fragptr.p->m_log_part_ptr_i = ptr.i;
-    fragptr.p->lqhInstanceKey = lpinfo.instanceKey(logPartNo);
+    fragptr.p->lqhInstanceKey = getInstanceKey(tabptr.i, req->fragId);
   }
 
   if (DictTabInfo::isOrderedIndex(tabptr.p->tableType)) {

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.cpp	2011-07-05 12:46:07 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.cpp	2012-02-02 21:00:28 +0000
@@ -144,7 +144,6 @@ DbtuxProxy::sendINDEX_STAT_IMPL_REQ(Sign
   const Uint32 instance = workerInstance(ss.m_worker);
   NdbLogPartInfo lpinfo(instance);
 
-  //XXX remove unused
   switch (req->requestType) {
   case IndexStatReq::RT_START_MON:
     /*
@@ -152,11 +151,6 @@ DbtuxProxy::sendINDEX_STAT_IMPL_REQ(Sign
      * to turn off any possible old assignment.  In MT-LQH we also have
      * to check which worker owns the frag.
      */
-    if (req->fragId != ZNIL
-        && !lpinfo.partNoOwner(req->indexId, req->fragId)) {
-      jam();
-      req->fragId = ZNIL;
-    }
     break;
   case IndexStatReq::RT_STOP_MON:
     /*
@@ -165,34 +159,8 @@ DbtuxProxy::sendINDEX_STAT_IMPL_REQ(Sign
      */
     ndbrequire(req->fragId == ZNIL);
     break;
-  case IndexStatReq::RT_SCAN_FRAG:
-    ndbrequire(req->fragId != ZNIL);
-    if (!lpinfo.partNoOwner(req->indexId, req->fragId)) {
-      jam();
-      skipReq(ss);
-      return;
-    }
-    break;
-  case IndexStatReq::RT_CLEAN_NEW:
-  case IndexStatReq::RT_CLEAN_OLD:
-  case IndexStatReq::RT_CLEAN_ALL:
-    ndbrequire(req->fragId == ZNIL);
-    break;
-  case IndexStatReq::RT_DROP_HEAD:
-    /*
-     * Only one client can do the PK-delete of the head record.  We use
-     * of course the worker which owns the assigned fragment.
-     */
-    ndbrequire(req->fragId != ZNIL);
-    if (!lpinfo.partNoOwner(req->indexId, req->fragId)) {
-      jam();
-      skipReq(ss);
-      return;
-    }
-    break;
   default:
     ndbrequire(false);
-    break;
   }
 
   sendSignal(workerRef(ss.m_worker), GSN_INDEX_STAT_IMPL_REQ,
@@ -256,36 +224,10 @@ DbtuxProxy::execINDEX_STAT_REP(Signal* s
   jamEntry();
   const IndexStatRep* rep =
     (const IndexStatRep*)signal->getDataPtr();
-  Ss_INDEX_STAT_REP& ss = ssSeize<Ss_INDEX_STAT_REP>();
-  ss.m_rep = *rep;
-  ndbrequire(signal->getLength() == IndexStatRep::SignalLength);
-  sendREQ(signal, ss);
-  ssRelease<Ss_INDEX_STAT_REP>(ss);
-}
-
-void
-DbtuxProxy::sendINDEX_STAT_REP(Signal* signal, Uint32 ssId,
-                               SectionHandle*)
-{
-  Ss_INDEX_STAT_REP& ss = ssFind<Ss_INDEX_STAT_REP>(ssId);
-
-  IndexStatRep* rep = (IndexStatRep*)signal->getDataPtrSend();
-  *rep = ss.m_rep;
-  rep->senderData = reference();
-  rep->senderData = ssId;
-
-  const Uint32 instance = workerInstance(ss.m_worker);
-  NdbLogPartInfo lpinfo(instance);
-
-  ndbrequire(rep->fragId != ZNIL);
-  if (!lpinfo.partNoOwner(rep->indexId, rep->fragId)) {
-    jam();
-    skipReq(ss);
-    return;
-  }
 
-  sendSignal(workerRef(ss.m_worker), GSN_INDEX_STAT_REP,
-             signal, IndexStatRep::SignalLength, JBB);
+  Uint32 instance = getInstanceKey(rep->indexId, rep->fragId);
+  sendSignal(numberToRef(DBTUX, instance, getOwnNodeId()),
+             GSN_INDEX_STAT_REP, signal, signal->getLength(), JBB);
 }
 
 BLOCK_FUNCTIONS(DbtuxProxy)

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.hpp	2011-07-05 12:46:07 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxProxy.hpp	2012-02-02 21:00:28 +0000
@@ -69,20 +69,7 @@ protected:
   void sendINDEX_STAT_IMPL_CONF(Signal*, Uint32 ssId);
 
   // GSN_INDEX_STAT_REP
-  struct Ss_INDEX_STAT_REP : SsParallel {
-    IndexStatRep m_rep;
-    Ss_INDEX_STAT_REP() {
-      m_sendREQ = (SsFUNCREQ)&DbtuxProxy::sendINDEX_STAT_REP;
-      m_sendCONF = 0;
-    }
-    enum { poolSize = 1 };
-    static SsPool<Ss_INDEX_STAT_REP>& pool(LocalProxy* proxy) {
-      return ((DbtuxProxy*)proxy)->c_ss_INDEX_STAT_REP;
-    }
-  };
-  SsPool<Ss_INDEX_STAT_REP> c_ss_INDEX_STAT_REP;
   void execINDEX_STAT_REP(Signal*);
-  void sendINDEX_STAT_REP(Signal*, Uint32 ssId, SectionHandle*);
 };
 
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp	2011-11-11 13:31:19 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp	2012-02-02 21:00:28 +0000
@@ -498,23 +498,27 @@ Dbtux::statMonStart(Signal* signal, Stat
   Index& index = *c_indexPool.getPtr(req->indexId);
   D("statMonStart" << V(mon));
 
-  // RT_START_MON also sends ZNIL to all non-monitoring nodes
-  if (req->fragId == ZNIL)
+  FragPtr fragPtr;
+  fragPtr.setNull();
+
+  if (req->fragId != ZNIL)
   {
     jam();
-    index.m_statFragPtrI = RNIL;
-    D("non-monitoring node");
+    findFrag(index, req->fragId, fragPtr);
   }
-  else
+
+  if (fragPtr.i != RNIL)
   {
     jam();
-    FragPtr fragPtr;
-    findFrag(index, req->fragId, fragPtr);
-    ndbrequire(fragPtr.i != RNIL);
     index.m_statFragPtrI = fragPtr.i;
     fragPtr.p->m_entryOps = 0;
     D("monitoring node" << V(index));
   }
+  else
+  {
+    jam();
+    index.m_statFragPtrI = RNIL;
+  }
 
   statMonConf(signal, mon);
 }

=== modified file 'storage/ndb/src/mgmsrv/ConfigInfo.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2012-01-30 15:12:41 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2012-02-02 21:00:28 +0000
@@ -1705,7 +1705,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
     "TotalSendBufferMemory",
     DB_TOKEN,
     "Total memory to use for send buffers in all transporters",
-    ConfigInfo::CI_DEPRECATED,
+    ConfigInfo::CI_USED,
     false,
     ConfigInfo::CI_INT,
     "0",

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (jonas.oreland:3804 to 3805) Jonas Oreland17 Feb