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@stripped, 2007-02-19 21:29:18+01:00, jonas@stripped +6 -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.4.7
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2007-02-19 21:24:34+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.24.1.2
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-02-19 21:29:16+01:00, jonas@stripped +1 -2
merge
MERGE: 1.96.1.5
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-02-19 21:24:34+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.129.1.2
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2007-02-19 21:24:34+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.41.1.2
storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-02-19 21:24:34+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.36.1.3
storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-02-19 21:24:35+01:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.61.1.3
# 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.66/storage/ndb/test/run-test/daily-basic-tests.txt 2007-02-19 21:29:24 +01:00
+++ 1.67/storage/ndb/test/run-test/daily-basic-tests.txt 2007-02-19 21:29:24 +01:00
@@ -525,6 +525,10 @@
cmd: testNodeRestart
args: -n Bug25554 T1
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug26457 T1
+
#
# DICT TESTS
max-time: 1500
--- 1.26/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-02-19 21:29:24 +01:00
+++ 1.27/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-02-19 21:29:24 +01:00
@@ -1381,6 +1381,7 @@
Uint32 csystemnodes;
Uint32 currentgcp;
Uint32 c_newest_restorable_gci;
+ Uint32 c_set_initial_start_flag;
enum GcpMasterTakeOverState {
GMTOS_IDLE = 0,
--- 1.102/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-02-19 21:29:24 +01:00
+++ 1.103/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-02-19 21:29:24 +01:00
@@ -677,6 +677,12 @@
Uint32 tmp= SYSFILE->m_restart_seq;
memcpy(sysfileData, cdata, sizeof(sysfileData));
SYSFILE->m_restart_seq = tmp;
+
+ if (c_set_initial_start_flag)
+ {
+ jam();
+ Sysfile::setInitialStartOngoing(SYSFILE->systemRestartBits);
+ }
}
c_copyGCISlave.m_copyReason = reason;
@@ -1290,6 +1296,11 @@
// The permission is given by the master node in the alive set.
/*-----------------------------------------------------------------------*/
createMutexes(signal, 0);
+ if (cstarttype == NodeState::ST_INITIAL_NODE_RESTART)
+ {
+ jam();
+ c_set_initial_start_flag = TRUE; // In sysfile...
+ }
break;
case ZNDB_SPH3:
@@ -4829,6 +4840,8 @@
Dbdih::startLcpMasterTakeOver(Signal* signal, Uint32 nodeId){
jam();
+ Uint32 oldNode = c_lcpMasterTakeOverState.failedNodeId;
+
c_lcpMasterTakeOverState.minTableId = ~0;
c_lcpMasterTakeOverState.minFragId = ~0;
c_lcpMasterTakeOverState.failedNodeId = nodeId;
@@ -4847,7 +4860,20 @@
/**
* Node failure during master take over...
*/
- g_eventLogger.info("Nodefail during master take over");
+ g_eventLogger.info("Nodefail during master take over (old: %)", oldNode);
+ }
+
+ NodeRecordPtr nodePtr;
+ nodePtr.i = oldNode;
+ if (oldNode > 0 && oldNode < MAX_NDB_NODES)
+ {
+ jam();
+ ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
+ if (nodePtr.p->m_nodefailSteps.get(NF_LCP_TAKE_OVER))
+ {
+ jam();
+ checkLocalNodefailComplete(signal, oldNode, NF_LCP_TAKE_OVER);
+ }
}
setLocalNodefailHandling(signal, nodeId, NF_LCP_TAKE_OVER);
@@ -5864,6 +5890,14 @@
jamEntry();
const BlockReference newMasterBlockref = req->masterRef;
+ if (newMasterBlockref != cmasterdihref)
+ {
+ jam();
+ ndbout_c("resending GSN_MASTER_LCPREQ");
+ sendSignalWithDelay(reference(), GSN_MASTER_LCPREQ, signal,
+ signal->getLength(), 50);
+ return;
+ }
Uint32 failedNodeId = req->failedNodeId;
/**
@@ -6160,6 +6194,8 @@
ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
nodePtr.p->lcpStateAtTakeOver = lcpState;
+ CRASH_INSERTION(7180);
+
#ifdef VM_TRACE
g_eventLogger.info("MASTER_LCPCONF");
printMASTER_LCP_CONF(stdout, &signal->theData[0], 0, 0);
@@ -10718,6 +10754,17 @@
sendSignal(c_lcpState.m_masterLcpDihRef, GSN_LCP_COMPLETE_REP, signal,
LcpCompleteRep::SignalLength, JBB);
+
+ /**
+ * Say that an initial node restart does not need to be redone
+ * once node has been part of first LCP
+ */
+ if (c_set_initial_start_flag &&
+ c_lcpState.m_participatingLQH.get(getOwnNodeId()))
+ {
+ jam();
+ c_set_initial_start_flag = FALSE;
+ }
}
/*-------------------------------------------------------------------------- */
--- 1.134/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-02-19 21:29:24 +01:00
+++ 1.135/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-02-19 21:29:24 +01:00
@@ -11904,7 +11904,7 @@
return;
}
- if (getNodeState().getNodeRestartInProgress())
+ if (getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE)
{
GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0];
saveRef->dihPtr = dihPtr;
@@ -11951,7 +11951,6 @@
}//if
ndbrequire(ccurrentGcprec == RNIL);
-
ccurrentGcprec = 0;
gcpPtr.i = ccurrentGcprec;
ptrCheckGuard(gcpPtr, cgcprecFileSize, gcpRecord);
--- 1.44/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-02-19 21:29:24 +01:00
+++ 1.45/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-02-19 21:29:24 +01:00
@@ -75,8 +75,8 @@
{ DBTUP_REF, 1 , 4000, 4007 },
{ DBDICT_REF, 1 , 6000, 6003 },
{ NDBCNTR_REF, 0 , 1000, 1999 },
+ { CMVMI_REF, 1 , 9000, 9999 }, // before QMGR
{ QMGR_REF, 1 , 1, 999 },
- { CMVMI_REF, 1 , 9000, 9999 },
{ TRIX_REF, 1 , 0, 0 },
{ BACKUP_REF, 1 , 10000, 10999 },
{ DBUTIL_REF, 1 , 11000, 11999 },
--- 1.40/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-02-19 21:29:24 +01:00
+++ 1.41/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-02-19 21:29:24 +01:00
@@ -1178,6 +1178,85 @@
return NDBT_OK;
}
+int
+runBug26457(NDBT_Context* ctx, NDBT_Step* step)
+{
+ NdbRestarter res;
+ if (res.getNumDbNodes() < 4)
+ return NDBT_OK;
+
+ int loops = ctx->getNumLoops();
+ while (loops --)
+ {
+retry:
+ int master = res.getMasterNodeId();
+ int next = res.getNextMasterNodeId(master);
+
+ ndbout_c("master: %d next: %d", master, next);
+
+ if (res.getNodeGroup(master) == res.getNodeGroup(next))
+ {
+ res.restartOneDbNode(next, false, false, true);
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+ goto retry;
+ }
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 2 };
+
+ if (res.dumpStateOneNode(next, val2, 2))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(next, 7180))
+ return NDBT_FAILED;
+
+ res.restartOneDbNode(master, false, false, true);
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
+int
+runBug26481(NDBT_Context* ctx, NDBT_Step* step)
+{
+
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter res;
+
+ int node = res.getRandomNotMasterNodeId(rand());
+ ndbout_c("node: %d", node);
+ if (res.restartOneDbNode(node, true, true, true))
+ return NDBT_FAILED;
+
+ if (res.waitNodesNoStart(&node, 1))
+ return NDBT_FAILED;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (res.dumpStateOneNode(node, val2, 2))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node, 7018))
+ return NDBT_FAILED;
+
+ if (res.startNodes(&node, 1))
+ return NDBT_FAILED;
+
+ res.waitNodesStartPhase(&node, 1, 3);
+
+ if (res.waitNodesNoStart(&node, 1))
+ return NDBT_FAILED;
+
+ res.startNodes(&node, 1);
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+}
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
@@ -1513,6 +1592,12 @@
}
TESTCASE("Bug25554", ""){
INITIALIZER(runBug25554);
+}
+TESTCASE("Bug26457", ""){
+ INITIALIZER(runBug26457);
+}
+TESTCASE("Bug26481", ""){
+ INITIALIZER(runBug26481);
}
NDBT_TESTSUITE_END(testNodeRestart);
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2422) | jonas | 19 Feb |