Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@1.2582, 2007-09-29 11:13:15+02:00, jonas@perch.ndb.mysql.com +2 -0
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/telco-6.1
MERGE: 1.2403.9.82
storage/ndb/test/ndbapi/testSystemRestart.cpp@1.18, 2007-09-29 11:13:13+02:00, jonas@perch.ndb.mysql.com +133 -0
merge
MERGE: 1.13.1.2
storage/ndb/test/run-test/daily-basic-tests.txt@1.86, 2007-09-29 11:12:20+02:00, jonas@perch.ndb.mysql.com +0 -0
Auto merged
MERGE: 1.61.1.19
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/telco-6.1/RESYNC
--- 1.85/storage/ndb/test/run-test/daily-basic-tests.txt 2007-09-29 11:13:19 +02:00
+++ 1.86/storage/ndb/test/run-test/daily-basic-tests.txt 2007-09-29 11:13:19 +02:00
@@ -884,29 +884,61 @@
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_1b D1
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_1 D2
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_1b D2
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_1_LCP D1
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_1b_LCP D1
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_1_LCP D2
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_1b_LCP D2
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_2 D1
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_2b D1
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_2 D2
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_2b D2
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_2_LCP D1
max-time: 1500
cmd: testSystemRestart
+args: -n SR_DD_2b_LCP D1
+
+max-time: 1500
+cmd: testSystemRestart
args: -n SR_DD_2_LCP D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2b_LCP D2
- 1.17/storage/ndb/test/ndbapi/testSystemRestart.cpp 2007-09-29 11:13:19 +02:00
+++ 1.18/storage/ndb/test/ndbapi/testSystemRestart.cpp 2007-09-29 11:13:19 +02:00
@@ -1220,6 +1220,213 @@
return result;
}
+int
+runStopper(NDBT_Context* ctx, NDBT_Step* step)
+{
+ NdbRestarter restarter;
+ Uint32 stop = 0;
+loop:
+ while (!ctx->isTestStopped() &&
+ ((stop = ctx->getProperty("StopAbort", Uint32(0))) == 0))
+ {
+ NdbSleep_MilliSleep(30);
+ }
+
+ if (ctx->isTestStopped())
+ {
+ return NDBT_OK;
+ }
+
+ ndbout << "Killing in " << stop << "ms..." << flush;
+ NdbSleep_MilliSleep(stop);
+ restarter.restartAll(false, true, true);
+ ctx->setProperty("StopAbort", Uint32(0));
+ goto loop;
+}
+
+int runSR_DD_1(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ int result = NDBT_OK;
+ Uint32 loops = ctx->getNumLoops();
+ int count;
+ NdbRestarter restarter;
+ NdbBackup backup(GETNDB(step)->getNodeId()+1);
+ bool lcploop = ctx->getProperty("LCP", (unsigned)0);
+ bool all = ctx->getProperty("ALL", (unsigned)0);
+
+ Uint32 i = 1;
+ Uint32 backupId;
+
+ int val[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ int lcp = DumpStateOrd::DihMinTimeBetweenLCP;
+
+ int startFrom = 0;
+
+ HugoTransactions hugoTrans(*ctx->getTab());
+ while(i<=loops && result != NDBT_FAILED)
+ {
+
+ if (lcploop)
+ {
+ CHECK(restarter.dumpStateAllNodes(&lcp, 1) == 0);
+ }
+
+ int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+ //CHECK(restarter.dumpStateAllNodes(&val, 1) == 0);
+
+ ndbout << "Loop " << i << "/"<< loops <<" started" << endl;
+ ndbout << "Loading records..." << startFrom << endl;
+ CHECK(hugoTrans.loadTable(pNdb, startFrom) == 0);
+
+ if (!all)
+ {
+ ndbout << "Making " << nodeId << " crash" << endl;
+ int kill[] = { 9999, 1000, 3000 };
+ CHECK(restarter.dumpStateOneNode(nodeId, val, 2) == 0);
+ CHECK(restarter.dumpStateOneNode(nodeId, kill, 3) == 0);
+ }
+ else
+ {
+ ndbout << "Crashing cluster" << endl;
+ ctx->setProperty("StopAbort", 1000 + rand() % (3000 - 1000));
+ }
+ Uint64 end = NdbTick_CurrentMillisecond() + 4000;
+ Uint32 row = startFrom;
+ do {
+ ndbout << "Loading from " << row << " to " << row + 1000 << endl;
+ if (hugoTrans.loadTableStartFrom(pNdb, row, 1000) != 0)
+ break;
+ row += 1000;
+ } while (NdbTick_CurrentMillisecond() < end);
+
+ if (!all)
+ {
+ ndbout << "Waiting for " << nodeId << " to restart" << endl;
+ CHECK(restarter.waitNodesNoStart(&nodeId, 1) == 0);
+ ndbout << "Restarting cluster" << endl;
+ CHECK(restarter.restartAll(false, true, true) == 0);
+ }
+ else
+ {
+ ndbout << "Waiting for cluster to restart" << endl;
+ }
+ CHECK(restarter.waitClusterNoStart() == 0);
+ CHECK(restarter.startAll() == 0);
+ CHECK(restarter.waitClusterStarted() == 0);
+
+ ndbout << "Starting backup..." << flush;
+ CHECK(backup.start(backupId) == 0);
+ ndbout << "done" << endl;
+
+ int cnt = 0;
+ CHECK(hugoTrans.selectCount(pNdb, 0, &cnt) == 0);
+ ndbout << "Found " << cnt << " records..." << endl;
+ ndbout << "Clearing..." << endl;
+ CHECK(hugoTrans.clearTable(pNdb,
+ NdbScanOperation::SF_TupScan, cnt) == 0);
+
+ if (cnt > startFrom)
+ {
+ startFrom = cnt;
+ }
+ startFrom += 1000;
+ i++;
+ }
+
+ ndbout << "runSR_DD_1 finished" << endl;
+ ctx->stopTest();
+ return result;
+}
+
+int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ int result = NDBT_OK;
+ Uint32 loops = ctx->getNumLoops();
+ Uint32 rows = ctx->getNumRecords();
+ int count;
+ NdbRestarter restarter;
+ NdbBackup backup(GETNDB(step)->getNodeId()+1);
+ bool lcploop = ctx->getProperty("LCP", (unsigned)0);
+ bool all = ctx->getProperty("ALL", (unsigned)0);
+
+ Uint32 i = 1;
+ Uint32 backupId;
+
+ int val[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ int lcp = DumpStateOrd::DihMinTimeBetweenLCP;
+
+ int startFrom = 0;
+
+ HugoTransactions hugoTrans(*ctx->getTab());
+ while(i<=loops && result != NDBT_FAILED)
+ {
+
+ if (lcploop)
+ {
+ CHECK(restarter.dumpStateAllNodes(&lcp, 1) == 0);
+ }
+
+ int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+
+ if (!all)
+ {
+ ndbout << "Making " << nodeId << " crash" << endl;
+ int kill[] = { 9999, 3000, 10000 };
+ CHECK(restarter.dumpStateOneNode(nodeId, val, 2) == 0);
+ CHECK(restarter.dumpStateOneNode(nodeId, kill, 3) == 0);
+ }
+ else
+ {
+ ndbout << "Crashing cluster" << endl;
+ ctx->setProperty("StopAbort", 1000 + rand() % (3000 - 1000));
+ }
+
+ Uint64 end = NdbTick_CurrentMillisecond() + 11000;
+ Uint32 row = startFrom;
+ do {
+ if (hugoTrans.loadTable(pNdb, rows) != 0)
+ break;
+
+ if (hugoTrans.clearTable(pNdb, NdbScanOperation::SF_TupScan, rows) != 0)
+ break;
+ } while (NdbTick_CurrentMillisecond() < end);
+
+ if (!all)
+ {
+ ndbout << "Waiting for " << nodeId << " to restart" << endl;
+ CHECK(restarter.waitNodesNoStart(&nodeId, 1) == 0);
+ ndbout << "Restarting cluster" << endl;
+ CHECK(restarter.restartAll(false, true, true) == 0);
+ }
+ else
+ {
+ ndbout << "Waiting for cluster to restart" << endl;
+ }
+
+ CHECK(restarter.waitClusterNoStart() == 0);
+ CHECK(restarter.startAll() == 0);
+ CHECK(restarter.waitClusterStarted() == 0);
+
+ ndbout << "Starting backup..." << flush;
+ CHECK(backup.start(backupId) == 0);
+ ndbout << "done" << endl;
+
+ int cnt = 0;
+ CHECK(hugoTrans.selectCount(pNdb, 0, &cnt) == 0);
+ ndbout << "Found " << cnt << " records..." << endl;
+ ndbout << "Clearing..." << endl;
+ CHECK(hugoTrans.clearTable(pNdb,
+ NdbScanOperation::SF_TupScan, cnt) == 0);
+ i++;
+ }
+
+ ndbout << "runSR_DD_2 finished" << endl;
+ ctx->stopTest();
+ return result;
+}
+
int
runBug29167(NDBT_Context* ctx, NDBT_Step* step)
{
@@ -1597,12 +1804,29 @@
}
TESTCASE("SR_DD_1", "")
{
+ TC_PROPERTY("ALL", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_1);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_1b", "")
+{
INITIALIZER(runWaitStarted);
STEP(runSR_DD_1);
FINALIZER(runClearTable);
}
TESTCASE("SR_DD_1_LCP", "")
{
+ TC_PROPERTY("ALL", 1);
+ TC_PROPERTY("LCP", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_1);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_1b_LCP", "")
+{
TC_PROPERTY("LCP", 1);
INITIALIZER(runWaitStarted);
STEP(runSR_DD_1);
@@ -1610,11 +1834,28 @@
}
TESTCASE("SR_DD_2", "")
{
+ TC_PROPERTY("ALL", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_2);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_2b", "")
+{
INITIALIZER(runWaitStarted);
STEP(runSR_DD_2);
FINALIZER(runClearTable);
}
TESTCASE("SR_DD_2_LCP", "")
+{
+ TC_PROPERTY("ALL", 1);
+ TC_PROPERTY("LCP", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_2);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_2b_LCP", "")
{
TC_PROPERTY("LCP", 1);
INITIALIZER(runWaitStarted);
--
MySQL Code Commits Mailing List
For list archives:
http://lists.mysql.com/commits
To unsubscribe:
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Sat Sep 29 05:13:40 2007