List:Commits« Previous MessageNext Message »
From:jonas oreland Date:February 4 2012 7:13am
Subject:bzr push into mysql-5.5-cluster-7.2 branch (jonas.oreland:3805 to 3806)
View as plain text  
 3806 jonas oreland	2012-02-03 [merge]
      ndb - merge 71 to 72

    modified:
      storage/ndb/include/ndb_version.h.in
      storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/ndbd.cpp
 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
=== modified file 'storage/ndb/include/ndb_version.h.in'
--- a/storage/ndb/include/ndb_version.h.in	2011-11-16 08:17:17 +0000
+++ b/storage/ndb/include/ndb_version.h.in	2012-02-03 13:37:34 +0000
@@ -714,4 +714,27 @@ ndb_configurable_log_parts(Uint32 x)
   }
   return x >= NDBD_CONFIGURABLE_LOG_PARTS_72;
 }
+
+#define NDBD_128_INSTANCES_ADDRESS_70 NDB_MAKE_VERSION(7,0,31)
+#define NDBD_128_INSTANCES_ADDRESS_71 NDB_MAKE_VERSION(7,1,20)
+#define NDBD_128_INSTANCES_ADDRESS_72 NDB_MAKE_VERSION(7,2,5)
+
+static
+inline
+int
+ndbd_128_instances_address(Uint32 x)
+{
+  const Uint32 major = (x >> 16) & 0xFF;
+  const Uint32 minor = (x >>  8) & 0xFF;
+
+  if (major == 7 && minor < 2)
+  {
+    if (minor == 0)
+      return x >= NDBD_128_INSTANCES_ADDRESS_70;
+    else if (minor == 1)
+      return x >= NDBD_128_INSTANCES_ADDRESS_71;
+  }
+  return x >= NDBD_128_INSTANCES_ADDRESS_72;
+}
+
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2012-01-11 18:28:28 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2012-02-03 13:37:34 +0000
@@ -1894,11 +1894,16 @@ private:
   Uint32 dihGetInstanceKey(FragmentstorePtr tFragPtr) {
     ndbrequire(!tFragPtr.isNull());
     Uint32 log_part_id = tFragPtr.p->m_log_part_id;
-    Uint32 instanceKey = 1 + log_part_id % MAX_NDBMT_LQH_WORKERS;
+    Uint32 instanceKey = 1 + (log_part_id % NDBMT_MAX_BLOCK_INSTANCES);
     return instanceKey;
   }
   Uint32 dihGetInstanceKey(Uint32 tabId, Uint32 fragId);
 
+  /**
+   * Get minimum version of nodes in alive-list
+   */
+  Uint32 getMinVersion() const;
+
   bool c_2pass_inr;
 };
 

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2012-01-04 08:37:25 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2012-02-03 13:37:34 +0000
@@ -7710,7 +7710,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ
         }
         const Uint32 max = NGPtr.p->nodeCount;
 	
-	fragments[count++] = (NGPtr.p->m_next_log_part++ / cnoReplicas); // Store logpart first
+	fragments[count++] = (NGPtr.p->m_next_log_part++ / cnoReplicas) % globalData.ndbLogParts; // Store logpart first
 	Uint32 tmp= next_replica_node[NGPtr.i];
         for(Uint32 replicaNo = 0; replicaNo < noOfReplicas; replicaNo++)
         {
@@ -7811,7 +7811,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ
                                        NDB_ARRAY_SIZE(fragments_per_node));
           NGPtr.i = getNodeGroup(node);
           ptrCheckGuard(NGPtr, MAX_NDB_NODES, nodeGroupRecord);
-          fragments[count++] = NGPtr.p->m_next_log_part++;
+          fragments[count++] = (NGPtr.p->m_next_log_part++) % globalData.ndbLogParts;
           fragments[count++] = node;
           fragments_per_node[node]++;
           for (Uint32 r = 0; r<noOfReplicas; r++)
@@ -16473,6 +16473,17 @@ void Dbdih::readFragment(RWFragment* rf,
   fragPtr.p->distributionKey = TdistKey;
 
   fragPtr.p->m_log_part_id = readPageWord(rf);
+  if (!ndbd_128_instances_address(getMinVersion()))
+  {
+    jam();
+    /**
+     * Limit log-part to 0-3 as older version didn't handle
+     *   getting requests to instances > 4
+     *   (in reality 7 i think...but that is useless as log-part dividor anyway)
+     */
+    fragPtr.p->m_log_part_id %= 4;
+  }
+
   inc_ng_refcount(getNodeGroup(fragPtr.p->preferredPrimary));
 }//Dbdih::readFragment()
 
@@ -19407,3 +19418,25 @@ error:
   sendSignal(req->senderRef, GSN_DROP_NODEGROUP_IMPL_REF, signal,
              DropNodegroupImplRef::SignalLength, JBB);
 }
+
+Uint32
+Dbdih::getMinVersion() const
+{
+  Uint32 ver = getNodeInfo(getOwnNodeId()).m_version;
+  NodeRecordPtr specNodePtr;
+  specNodePtr.i = cfirstAliveNode;
+  do
+  {
+    jam();
+    ptrCheckGuard(specNodePtr, MAX_NDB_NODES, nodeRecord);
+    Uint32 v = getNodeInfo(specNodePtr.i).m_version;
+    if (v < ver)
+    {
+      jam();
+      ver = v;
+    }
+    specNodePtr.i = specNodePtr.p->nextNode;
+  } while (specNodePtr.i != RNIL);
+
+  return ver;
+}

=== modified file 'storage/ndb/src/kernel/ndbd.cpp'
--- a/storage/ndb/src/kernel/ndbd.cpp	2012-01-30 14:28:55 +0000
+++ b/storage/ndb/src/kernel/ndbd.cpp	2012-02-03 11:00:32 +0000
@@ -234,7 +234,7 @@ init_global_memory_manager(EmulatorData
      * Add extra send buffer pages for NDB multithreaded case
      */
     {
-      Uint64 extra_mem;
+      Uint64 extra_mem = 0;
       ndb_mgm_get_int64_parameter(p, CFG_EXTRA_SEND_BUFFER_MEMORY, &extra_mem);
       Uint32 extra_mem_pages = Uint32((extra_mem + GLOBAL_PAGE_SIZE - 1) /
                                       GLOBAL_PAGE_SIZE);

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