List:Commits« Previous MessageNext Message »
From:Maitrayi Sabaratnam Date:May 2 2012 11:36am
Subject:bzr push into mysql-5.5-cluster-7.2-spj branch (maitrayi.sabaratnam:3863 to
3864)
View as plain text  
 3864 Maitrayi Sabaratnam	2012-05-02
      Fix NF_Join failure on slow machines - reduce client load

    modified:
      storage/ndb/test/include/HugoQueries.hpp
      storage/ndb/test/ndbapi/testSpj.cpp
      storage/ndb/test/src/HugoQueries.cpp
      storage/ndb/test/tools/hugoJoin.cpp
 3863 Ole John Aske	2012-04-26 [merge]
      Merge mysql-5.5-cluster-7.2 ==> mysql-5.5-cluster-7.2-spj

    added:
      storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests_consts.cpp
      storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests_consts.hpp
      storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests_lib.cpp
      storage/ndb/src/ndbjtie/test/test/NdbJTieConstantsTest.java
      storage/ndb/src/ndbjtie/test/test_ndbjtie_constants.cmd.in
      storage/ndb/src/ndbjtie/test/test_ndbjtie_constants.sh.in
      storage/ndb/src/ndbjtie/test/test_unload_ndbjtie_constants.cmd.in
      storage/ndb/src/ndbjtie/test/test_unload_ndbjtie_constants.sh.in
    modified:
      mysql-test/lib/My/Memcache.pm
      mysql-test/lib/mtr_cases.pm
      mysql-test/mysql-test-run.pl
      mysql-test/suite/ndb/r/ndb_join_pushdown_default.result
      mysql-test/suite/ndb/t/ndb_join_pushdown.inc
      mysql-test/suite/ndb_memcache/include/have_memcache.inc
      sql/ha_ndbcluster.cc
      sql/sql_select.cc
      storage/ndb/include/kernel/signaldata/DihScanTab.hpp
      storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
      storage/ndb/include/ndb_version.h.in
      storage/ndb/memcache/src/ndb_engine.c
      storage/ndb/memcache/src/ndb_engine_private.h
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbspj/Dbspj.hpp
      storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/vm/ArrayPool.hpp
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
      storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NDBAPIConst.java
      storage/ndb/src/ndbjtie/jtie/test/unload/test/MyLoadUnloadTest.java
      storage/ndb/src/ndbjtie/test/CMakeLists.txt
      storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests-t.alt
      storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests-t.cpp
      storage/ndb/src/ndbjtie/test/test/JTieTestBase.java
      storage/ndb/src/ndbjtie/test/test/NdbJTieMultiLibTest.java
      storage/ndb/src/ndbjtie/test/test_ndbjtie_multilib.cmd.in
      storage/ndb/src/ndbjtie/test/test_ndbjtie_multilib.sh.in
      storage/ndb/src/ndbjtie/test/test_unload_ndbjtie_multilib.cmd.in
      storage/ndb/src/ndbjtie/test/test_unload_ndbjtie_multilib.sh.in
      storage/ndb/test/ndbapi/testScan.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/test/include/HugoQueries.hpp'
--- a/storage/ndb/test/include/HugoQueries.hpp	2011-07-05 12:46:07 +0000
+++ b/storage/ndb/test/include/HugoQueries.hpp	2012-05-02 11:31:46 +0000
@@ -42,7 +42,9 @@ public:
   // Rows for for each of the operations
   Vector<Uint32> m_rows_found;
 
-  int runLookupQuery(Ndb*, int records, int batchsize = 1);
+  int runLookupQuery(Ndb*,
+                     int queries = 100,
+                     int batchsize = 1);
   int runScanQuery(Ndb*,
                    int abort = 4,
                    int parallelism = 0,

=== modified file 'storage/ndb/test/ndbapi/testSpj.cpp'
--- a/storage/ndb/test/ndbapi/testSpj.cpp	2012-03-28 15:02:39 +0000
+++ b/storage/ndb/test/ndbapi/testSpj.cpp	2012-05-02 11:31:46 +0000
@@ -75,6 +75,7 @@ runLookupJoin(NDBT_Context* ctx, NDBT_St
   int loops = ctx->getNumLoops();
   int joinlevel = ctx->getProperty("JoinLevel", 3);
   int records = ctx->getNumRecords();
+  int queries = records/joinlevel;
   int until_stopped = ctx->getProperty("UntilStopped", (Uint32)0);
   Uint32 stepNo = step->getStepNo();
 
@@ -86,7 +87,7 @@ runLookupJoin(NDBT_Context* ctx, NDBT_St
   while ((i<loops || until_stopped) && !ctx->isTestStopped())
   {
     g_info << i << ": ";
-    if (hugoTrans.runLookupQuery(GETNDB(step), records))
+    if (hugoTrans.runLookupQuery(GETNDB(step), queries))
     {
       g_info << endl;
       return NDBT_FAILED;
@@ -103,6 +104,7 @@ runLookupJoinError(NDBT_Context* ctx, ND
   int loops = ctx->getNumLoops();
   int joinlevel = ctx->getProperty("JoinLevel", 8);
   int records = ctx->getNumRecords();
+  int queries = records/joinlevel;
   int until_stopped = ctx->getProperty("UntilStopped", (Uint32)0);
   Uint32 stepNo = step->getStepNo();
 
@@ -148,7 +150,7 @@ runLookupJoinError(NDBT_Context* ctx, ND
     // It'd be better if test could differentiates failures from
     // fault injection and others.
     // We expect to fail, and it's a failure if we don't
-    if (!hugoTrans.runLookupQuery(GETNDB(step), records))
+    if (!hugoTrans.runLookupQuery(GETNDB(step), queries))
     {
       g_info << "LookUpJoinError didn't fail as expected."<< endl;
       // return NDBT_FAILED;
@@ -258,6 +260,7 @@ runJoin(NDBT_Context* ctx, NDBT_Step* st
   int loops = ctx->getNumLoops();
   int joinlevel = ctx->getProperty("JoinLevel", 3);
   int records = ctx->getNumRecords();
+  int queries = records/joinlevel;
   int until_stopped = ctx->getProperty("UntilStopped", (Uint32)0);
   Uint32 stepNo = step->getStepNo();
 
@@ -278,7 +281,7 @@ runJoin(NDBT_Context* ctx, NDBT_Step* st
       g_info << endl;
       return NDBT_FAILED;
     }
-    if (hugoTrans2.runLookupQuery(GETNDB(step), records))
+    if (hugoTrans2.runLookupQuery(GETNDB(step), queries))
     {
       g_info << endl;
       return NDBT_FAILED;
@@ -351,7 +354,7 @@ runRestarter(NDBT_Context* ctx, NDBT_Ste
 
     if (waitprogress)
     {
-      Uint32 maxwait = 30;
+      Uint32 maxwait = 60;
       ndbout_c("running: 0x%.8x", running);
       for (Uint32 checks = 0; checks < 3 && !ctx->isTestStopped(); checks++)
       {
@@ -391,7 +394,7 @@ runRestarter(NDBT_Context* ctx, NDBT_Ste
 
     if (waitprogress)
     {
-      Uint32 maxwait = 30;
+      Uint32 maxwait = 60;
       ndbout_c("running: 0x%.8x", running);
       for (Uint32 checks = 0; checks < 3 && !ctx->isTestStopped(); checks++)
       {

=== modified file 'storage/ndb/test/src/HugoQueries.cpp'
--- a/storage/ndb/test/src/HugoQueries.cpp	2011-11-03 17:22:01 +0000
+++ b/storage/ndb/test/src/HugoQueries.cpp	2012-05-02 11:31:46 +0000
@@ -135,10 +135,10 @@ HugoQueries::getValueForQueryOp(NdbQuery
 
 int
 HugoQueries::runLookupQuery(Ndb* pNdb,
-                            int records,
+                            int queries,
                             int batch)
 {
-  int r = 0;
+  int q = 0;
   int retryAttempt = 0;
 
   m_rows_found.clear();
@@ -153,10 +153,10 @@ HugoQueries::runLookupQuery(Ndb* pNdb,
 
   allocRows(batch);
 
-  while (r < records)
+  while (q < queries)
   {
-    if(r + batch > records)
-      batch = records - r;
+    if (q + batch > queries)
+      batch = queries - q;
 
     if (retryAttempt >= m_retryMax)
     {
@@ -188,7 +188,7 @@ HugoQueries::runLookupQuery(Ndb* pNdb,
     {
       char buf[NDB_MAX_TUPLE_SIZE];
       NdbQueryParamValue params[NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY];
-      equalForParameters(buf, m_ops[0], params, b + r);
+      equalForParameters(buf, m_ops[0], params, b + q);
 
       NdbQuery * query = pTrans->createQuery(m_query_def, params);
       if (query == 0)
@@ -301,7 +301,7 @@ HugoQueries::runLookupQuery(Ndb* pNdb,
     }
 
     pTrans->close();
-    r += batch;
+    q += batch;
 
     for (unsigned i = 0; i<batch_rows_found.size(); i++)
       m_rows_found[i] += batch_rows_found[i];

=== modified file 'storage/ndb/test/tools/hugoJoin.cpp'
--- a/storage/ndb/test/tools/hugoJoin.cpp	2011-09-28 09:54:05 +0000
+++ b/storage/ndb/test/tools/hugoJoin.cpp	2012-05-02 11:31:46 +0000
@@ -209,7 +209,7 @@ int main(int argc, char** argv){
       }
       else
       {
-        res = hq.runLookupQuery(&MyNdb, _records, _batch);
+        res = hq.runLookupQuery(&MyNdb, _records/_depth, _batch);
       }
       if (res != 0)
       {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2-spj branch (maitrayi.sabaratnam:3863 to3864) Maitrayi Sabaratnam2 May