1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

testIndex -n NFNR1

Bugs in scan(tc)
        nf-handling(api)
        exec-handling(tc)


ndb/include/ndbapi/NdbConnection.hpp:
  Allow dropped signal during NF handling
ndb/include/ndbapi/NdbOperation.hpp:
  Add option to allow dropped signals
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  1) Printer for state
  2) New option to sendtckeyconf (index)
     - clear exec flag
  3) Moved init of *global* apiConnectptr to
     prevent errornous scan_tabconf
     ARGH!!!
ndb/src/ndbapi/NdbConnection.cpp:
  Move abort from checkState_trans
  since it can be ok with "illegal" signals during NF handling
ndb/src/ndbapi/NdbConnectionScan.cpp:
  Move abort from checkState_trans
  since it can be ok with "illegal" signals during NF handling
ndb/src/ndbapi/Ndbif.cpp:
  1) Indentation
  2) Better handling of TCKEY_FAILCONF
  - always ack commit ack marker
    even if transaction has already been removed
  3) abort on 4012 (VM_TRACE)
ndb/src/ndbapi/TransporterFacade.cpp:
  Don't trace APIREG_REQ/CONF by default
ndb/test/include/NDBT_Test.hpp:
  Atomic decProperty (used for semaphore impl.)
ndb/test/ndbapi/testIndex.cpp:
  Impl. option to sync restarts
ndb/test/src/NDBT_Test.cpp:
  Atomic decProperty
This commit is contained in:
unknown
2004-07-07 13:40:53 +02:00
parent 7992ae4239
commit abf8c93d80
10 changed files with 301 additions and 141 deletions

View File

@ -380,6 +380,25 @@ runVerifyIndex(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
int
sync_down(NDBT_Context* ctx){
Uint32 threads = ctx->getProperty("PauseThreads", (unsigned)0);
if(threads){
ctx->decProperty("PauseThreads");
}
}
int
sync_up_and_wait(NDBT_Context* ctx){
Uint32 threads = ctx->getProperty("Threads", (unsigned)0);
ndbout_c("Setting PauseThreads to %d", threads);
ctx->setProperty("PauseThreads", threads);
ctx->getPropertyWait("PauseThreads", (unsigned)0);
if(threads){
ndbout_c("wait completed");
}
}
int
runTransactions1(NDBT_Context* ctx, NDBT_Step* step){
// Verify that data in index match
@ -394,10 +413,17 @@ runTransactions1(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Updated table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
if (hugoTrans.scanUpdateRecords(pNdb, rows, batchSize) != 0){
g_err << "Updated table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
}
return NDBT_OK;
}
@ -418,7 +444,7 @@ runTransactions2(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
#endif
sync_down(ctx);
if(ctx->isTestStopped())
break;
#if 1
@ -427,6 +453,7 @@ runTransactions2(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
#endif
sync_down(ctx);
}
return NDBT_OK;
}
@ -447,6 +474,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Load table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -454,7 +482,8 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Updated table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -463,6 +492,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -471,6 +501,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -479,6 +510,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -486,12 +518,15 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Clear table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
int count = -1;
if(utilTrans.selectCount(pNdb, 64, &count) != 0 || count != 0)
return NDBT_FAILED;
sync_down(ctx);
}
return NDBT_OK;
}
@ -510,6 +545,7 @@ int runRestarts(NDBT_Context* ctx, NDBT_Step* step){
result = NDBT_FAILED;
break;
}
sync_up_and_wait(ctx);
i++;
}
ctx->stopTest();
@ -1259,6 +1295,7 @@ TESTCASE("CreateLoadDrop_O",
TESTCASE("NFNR1",
"Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("LoggedIndexes", (unsigned)0);
//TC_PROPERTY("Threads", 2);
INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex);
INITIALIZER(runLoadTable);