List:Commits« Previous MessageNext Message »
From:Mikael Ronstrom Date:February 23 2012 8:33pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (mikael.ronstrom:3753 to 3756)
View as plain text  
 3756 Mikael Ronstrom	2012-02-23
      More fixes

    modified:
      storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
      storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
 3755 Mikael Ronstrom	2012-02-23
      Minor fix

    modified:
      storage/ndb/include/kernel/ndb_limits.h
 3754 Mikael Ronstrom	2012-02-23
      Preliminary patch to increase size of default hash map to make it possible to have more than 240 partitions and to make distribution over partitions more even

    modified:
      storage/ndb/include/kernel/ndb_limits.h
      storage/ndb/include/ndbapi/ndbapi_limits.h
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/vm/SimulatedBlock.hpp
      storage/ndb/src/ndbapi/NdbDictionary.cpp
      storage/ndb/tools/delete_all.cpp
      storage/ndb/tools/select_count.cpp
 3753 Mikael Ronström	2012-02-20
      more merge fixes

    modified:
      storage/ndb/include/kernel/ndb_limits.h
      storage/ndb/src/kernel/ndbd.cpp
      storage/ndb/src/kernel/vm/dummy_nonmt.cpp
      storage/ndb/src/mgmsrv/ConfigInfo.cpp
=== modified file 'storage/ndb/include/kernel/ndb_limits.h'
--- a/storage/ndb/include/kernel/ndb_limits.h	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/include/kernel/ndb_limits.h	revid:mikael.ronstrom@oracle.com-20120223195914-ggtqkids2l8s9kcw
@@ -191,7 +191,7 @@
  */
 #define LCP_RESTORE_BUFFER (4*32)
 
-#define NDB_DEFAULT_HASHMAP_BUCKTETS 240
+#define NDB_DEFAULT_HASHMAP_BUCKETS (240 * 16)
 
 /**
  * Bits/mask used for coding/decoding blockno/blockinstance

=== modified file 'storage/ndb/include/kernel/signaldata/DictTabInfo.hpp'
--- a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	revid:mikael.ronstrom@stripped9kcw
@@ -802,7 +802,7 @@ struct DictHashMapInfo {
   struct HashMap {
     char   HashMapName[MAX_TAB_NAME_SIZE];
     Uint32 HashMapBuckets;
-    Uint16 HashMapValues[512];
+    Uint16 HashMapValues[2*NDB_DEFAULT_HASHMAP_BUCKETS];
     Uint32 HashMapObjectId;
     Uint32 HashMapVersion;
     HashMap() {}

=== modified file 'storage/ndb/include/ndbapi/ndbapi_limits.h'
--- a/storage/ndb/include/ndbapi/ndbapi_limits.h	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/include/ndbapi/ndbapi_limits.h	revid:mikael.ronstrom@strippedgtqkids2l8s9kcw
@@ -22,6 +22,8 @@
 #define NDB_MAX_ATTRIBUTES_IN_INDEX NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY
 #define NDB_MAX_ATTRIBUTES_IN_TABLE 512
 
+#define NDB_MAX_PARTITIONS (240*16)
+
 #define NDB_MAX_TUPLE_SIZE_IN_WORDS 3500
 #define NDB_MAX_KEYSIZE_IN_WORDS 1023
 #define NDB_MAX_KEY_SIZE (NDB_MAX_KEYSIZE_IN_WORDS*4)

=== modified file 'storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp'
--- a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp	revid:mikael.ronstrom@stripped914-ggtqkids2l8s9kcw
@@ -337,14 +337,15 @@ const
 SimpleProperties::SP2StructMapping
 DictHashMapInfo::Mapping[] = {
   DHMIMAPS(HashMap, HashMapName, HashMapName, 0, MAX_TAB_NAME_SIZE),
-  DHMIMAP2(HashMap, HashMapBuckets, HashMapBuckets, 0, 256),
+  DHMIMAP2(HashMap, HashMapBuckets, HashMapBuckets, 0, NDB_DEFAULT_HASHMAP_BUCKETS),
   DTIMAP(HashMap, HashMapObjectId, HashMapObjectId),
   DTIMAP(HashMap, HashMapVersion, HashMapVersion),
 
   /**
    * This *should* change to Uint16 or similar once endian is pushed
    */
-  DHMIMAPB(HashMap, HashMapValues, HashMapValues, 0, 256*2, HashMapBuckets)
+  DHMIMAPB(HashMap, HashMapValues, HashMapValues, 0,
+           NDB_DEFAULT_HASHMAP_BUCKETS*2, HashMapBuckets)
 };
 
 //static

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	revid:mikael.ronstrom@stripped
@@ -4933,7 +4933,7 @@ void Dbdict::handleTabInfoInit(Signal * 
 
     char buf[MAX_TAB_NAME_SIZE+1];
     BaseString::snprintf(buf, sizeof(buf), "DEFAULT-HASHMAP-%u-%u",
-                         NDB_DEFAULT_HASHMAP_BUCKTETS,
+                         NDB_DEFAULT_HASHMAP_BUCKETS,
                          fragments);
     DictObject* dictObj = get_object(buf);
     if (dictObj && dictObj->m_type == DictTabInfo::HashMap)
@@ -23053,7 +23053,7 @@ Dbdict::createNodegroup_subOps(Signal* s
      *   and still continue transaction
      *   but that i dont know how
      */
-    Uint32 buckets = 240;
+    Uint32 buckets = NDB_DEFAULT_HASHMAP_BUCKETS;
     Uint32 fragments = get_default_fragments(signal, 1);
     char buf[MAX_TAB_NAME_SIZE+1];
     BaseString::snprintf(buf, sizeof(buf), "DEFAULT-HASHMAP-%u-%u",
@@ -28615,7 +28615,7 @@ Dbdict::createHashMap_parse(Signal* sign
     if (impl_req->requestType & CreateHashMapReq::CreateDefault)
     {
       jam();
-      impl_req->buckets = NDB_DEFAULT_HASHMAP_BUCKTETS;
+      impl_req->buckets = NDB_DEFAULT_HASHMAP_BUCKETS;
       impl_req->fragments = 0;
     }
 
@@ -28858,7 +28858,7 @@ Dbdict::createHashMap_parse(Signal* sign
     Uint32 tmp = 0;
     for (Uint32 i = 0; i<hm.HashMapBuckets; i++)
     {
-      ndbrequire(hm.HashMapValues[i] < 256);
+      ndbrequire(hm.HashMapValues[i] < NDB_DEFAULT_HASHMAP_BUCKETS);
       map_ptr.p->m_map[i] = (Uint8)hm.HashMapValues[i];
       if (hm.HashMapValues[i] > tmp)
         tmp = hm.HashMapValues[i];

=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.hpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	revid:mikael.ronstrom@stripped120223195914-ggtqkids2l8s9kcw
@@ -1368,7 +1368,7 @@ SectionHandle::~SectionHandle()
 
 struct Hash2FragmentMap
 {
-  STATIC_CONST( MAX_MAP = 240 );
+  STATIC_CONST( MAX_MAP = NDB_DEFAULT_HASHMAP_BUCKETS );
   Uint32 m_cnt;
   Uint32 m_fragments;
   Uint8 m_map[MAX_MAP];

=== modified file 'storage/ndb/src/ndbapi/NdbDictionary.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionary.cpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp	revid:mikael.ronstrom@stripped0120223195914-ggtqkids2l8s9kcw
@@ -1896,7 +1896,7 @@ NdbDictionary::Dictionary::getDefaultHas
 {
   BaseString tmp;
   tmp.assfmt("DEFAULT-HASHMAP-%u-%u",
-             NDB_DEFAULT_HASHMAP_BUCKTETS, fragments);
+             NDB_DEFAULT_HASHMAP_BUCKETS, fragments);
 
   return getHashMap(dst, tmp.c_str());
 }
@@ -1928,12 +1928,12 @@ NdbDictionary::Dictionary::initDefaultHa
 {
   BaseString tmp;
   tmp.assfmt("DEFAULT-HASHMAP-%u-%u",
-             NDB_DEFAULT_HASHMAP_BUCKTETS, fragments);
+             NDB_DEFAULT_HASHMAP_BUCKETS, fragments);
 
   dst.setName(tmp.c_str());
 
   Vector<Uint32> map;
-  for (Uint32 i = 0; i<NDB_DEFAULT_HASHMAP_BUCKTETS; i++)
+  for (Uint32 i = 0; i<NDB_DEFAULT_HASHMAP_BUCKETS; i++)
   {
     map.push_back(i % fragments);
   }
@@ -2057,14 +2057,14 @@ retry:
     if (cnt == 0)
     {
       newmap.m_name.assfmt("HASHMAP-%u-%u-%u",
-                           NDB_DEFAULT_HASHMAP_BUCKTETS,
+                           NDB_DEFAULT_HASHMAP_BUCKETS,
                            oldcnt,
                            newcnt);
     }
     else
     {
       newmap.m_name.assfmt("HASHMAP-%u-%u-%u-#%u",
-                           NDB_DEFAULT_HASHMAP_BUCKTETS,
+                           NDB_DEFAULT_HASHMAP_BUCKETS,
                            oldcnt,
                            newcnt,
                            cnt);

=== modified file 'storage/ndb/tools/delete_all.cpp'
--- a/storage/ndb/tools/delete_all.cpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/tools/delete_all.cpp	revid:mikael.ronstrom@stripped2l8s9kcw
@@ -24,7 +24,7 @@
 #include <NDBT.hpp>
 
 static int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
-                       bool fetch_across_commit, int parallelism=240);
+                       bool fetch_across_commit, int parallelism=NDB_MAX_PARTITIONS);
 
 const char *load_default_groups[]= { "mysql_cluster",0 };
 

=== modified file 'storage/ndb/tools/select_count.cpp'
--- a/storage/ndb/tools/select_count.cpp	revid:mikael@dator9-20120220193954-uxny7gol2m3tg8qq
+++ b/storage/ndb/tools/select_count.cpp	revid:mikael.ronstrom@stripped23195914-ggtqkids2l8s9kcw
@@ -34,7 +34,7 @@ select_count(Ndb* pNdb, const NdbDiction
 	     NdbOperation::LockMode lock);
 
 static const char* _dbname = "TEST_DB";
-static int _parallelism = 240;
+static int _parallelism = NDB_MAX_PARTITIONS;
 static int _lock = 0;
 
 const char *load_default_groups[]= { "mysql_cluster",0 };
@@ -47,7 +47,7 @@ static struct my_option my_long_options[
     GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
   { "parallelism", 'p', "parallelism",
     (uchar**) &_parallelism, (uchar**) &_parallelism, 0,
-    GET_INT, REQUIRED_ARG, 240, 0, 0, 0, 0, 0 }, 
+    GET_INT, REQUIRED_ARG, NDB_MAX_PARTITIONS, 0, 0, 0, 0, 0 }, 
   { "lock", 'l', "Read(0), Read-hold(1), Exclusive(2)",
     (uchar**) &_lock, (uchar**) &_lock, 0,
     GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (mikael.ronstrom:3753 to 3756) Mikael Ronstrom24 Feb