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-05-29 07:38:27+02:00, jonas@stripped +9 -0
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/51-telco
MERGE: 1.2403.28.54
storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2007-05-29 07:25:55+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.32.1.5
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.96.7.7
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.57.3.3
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.129.4.11
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.18.3.3
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.41.3.3
storage/ndb/src/kernel/blocks/pgman.cpp@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.20.2.3
storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-05-29 07:38:24+02:00, jonas@stripped +3 -7
merge
MERGE: 1.36.2.11
storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-05-29 07:25:56+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.61.4.6
# 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/51-telco/RESYNC
--- 1.25/storage/ndb/src/kernel/blocks/pgman.cpp 2007-05-29 07:38:32 +02:00
+++ 1.26/storage/ndb/src/kernel/blocks/pgman.cpp 2007-05-29 07:38:32 +02:00
@@ -946,9 +946,11 @@
#ifdef VM_TRACE
debugOut << "PGMAN: >process_map" << endl;
#endif
- int max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
- if (max_count > 0)
+ int max_count = 0;
+ if (m_param.m_max_io_waits > m_stats.m_current_io_waits) {
+ max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
max_count = max_count / 2 + 1;
+ }
Page_sublist& pl_map = *m_page_sublist[Page_entry::SL_MAP];
while (! pl_map.isEmpty() && --max_count >= 0)
@@ -1100,15 +1102,10 @@
}
int max_loop_count = m_param.m_max_loop_count;
- int max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
-
- if (max_count > 0)
- {
+ int max_count = 0;
+ if (m_param.m_max_io_waits > m_stats.m_current_io_waits) {
+ max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
max_count = max_count / 2 + 1;
- /*
- * Possibly add code here to avoid writing too rapidly. May be
- * unnecessary since only cold pages are cleaned.
- */
}
Ptr<Page_entry> ptr = m_cleanup_ptr;
@@ -1210,9 +1207,12 @@
Pgman::process_lcp(Signal* signal)
{
Page_hashlist& pl_hash = m_page_hashlist;
- int max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
- if (max_count > 0)
+
+ int max_count = 0;
+ if (m_param.m_max_io_waits > m_stats.m_current_io_waits) {
+ max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
max_count = max_count / 2 + 1;
+ }
#ifdef VM_TRACE
debugOut
--- 1.107/storage/ndb/test/run-test/daily-basic-tests.txt 2007-05-29 07:38:32 +02:00
+++ 1.108/storage/ndb/test/run-test/daily-basic-tests.txt 2007-05-29 07:38:32 +02:00
@@ -567,6 +567,10 @@
cmd: testDict
args: -n CreateAndDrop
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug28717 T1
+
max-time: 1500
cmd: testDict
args: -n CreateAndDropAtRandom -l 200 T1
@@ -714,7 +718,7 @@
max-time: 1000
cmd: testNdbApi
-args: -n BugBug28443
+args: -n Bug28443
#max-time: 500
#cmd: testInterpreter
--- 1.41/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-05-29 07:38:32 +02:00
+++ 1.42/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-05-29 07:38:32 +02:00
@@ -1,5 +1,5 @@
Next QMGR 1
-Next NDBCNTR 1001
+Next NDBCNTR 1002
Next NDBFS 2000
Next DBACC 3002
Next DBTUP 4029
@@ -525,3 +525,4 @@
NDBCNTR:
1000: Crash insertion on SystemError::CopyFragRef
+1001: Delay sending NODE_FAILREP (to own node), until error is cleared
--- 1.128/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-05-29 07:38:32 +02:00
+++ 1.129/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-05-29 07:38:32 +02:00
@@ -4827,12 +4827,18 @@
jam();
const Uint32 nodeId = failedNodePtr.i;
- if (c_lcpState.m_participatingLQH.get(failedNodePtr.i)){
+ if (isMaster() && c_lcpState.m_participatingLQH.get(failedNodePtr.i))
+ {
/*----------------------------------------------------*/
/* THE NODE WAS INVOLVED IN A LOCAL CHECKPOINT. WE */
/* MUST UPDATE THE ACTIVE STATUS TO INDICATE THAT */
/* THE NODE HAVE MISSED A LOCAL CHECKPOINT. */
/*----------------------------------------------------*/
+
+ /**
+ * Bug#28717, Only master should do this, as this status is copied
+ * to other nodes
+ */
switch (failedNodePtr.p->activeStatus) {
case Sysfile::NS_Active:
jam();
--- 1.60/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-05-29 07:38:33 +02:00
+++ 1.61/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-05-29 07:38:33 +02:00
@@ -1410,6 +1410,13 @@
{
jamEntry();
+ if (ERROR_INSERTED(1001))
+ {
+ sendSignalWithDelay(reference(), GSN_NODE_FAILREP, signal, 100,
+ signal->getLength());
+ return;
+ }
+
const NodeFailRep * nodeFail = (NodeFailRep *)&signal->theData[0];
NdbNodeBitmask allFailed;
allFailed.assign(NdbNodeBitmask::Size, nodeFail->theNodes);
--- 1.63/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-05-29 07:38:33 +02:00
+++ 1.64/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-05-29 07:38:33 +02:00
@@ -1629,6 +1629,85 @@
return NDBT_FAILED;
}
}
+
+ return NDBT_OK;
+}
+
+
+int
+runBug28717(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ Ndb* pNdb = GETNDB(step);
+ NdbRestarter res;
+
+ if (res.getNumDbNodes() < 4)
+ {
+ return NDBT_OK;
+ }
+
+ int master = res.getMasterNodeId();
+ int node0 = res.getRandomNodeOtherNodeGroup(master, rand());
+ int node1 = res.getRandomNodeSameNodeGroup(node0, rand());
+
+ ndbout_c("master: %d node0: %d node1: %d", master, node0, node1);
+
+ if (res.restartOneDbNode(node0, false, true, true))
+ {
+ return NDBT_FAILED;
+ }
+
+ {
+ int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_CHECKPOINT, 0 };
+ NdbLogEventHandle handle =
+ ndb_mgm_create_logevent_handle(res.handle, filter);
+
+
+ int dump[] = { DumpStateOrd::DihStartLcpImmediately };
+ struct ndb_logevent event;
+
+ for (Uint32 i = 0; i<3; i++)
+ {
+ res.dumpStateOneNode(master, dump, 1);
+ while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
+ event.type != NDB_LE_LocalCheckpointStarted);
+ while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
+ event.type != NDB_LE_LocalCheckpointCompleted);
+ }
+ }
+
+ if (res.waitNodesNoStart(&node0, 1))
+ return NDBT_FAILED;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ if (res.dumpStateOneNode(node0, val2, 2))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node0, 5010))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node1, 1001))
+ return NDBT_FAILED;
+
+ if (res.startNodes(&node0, 1))
+ return NDBT_FAILED;
+
+ NdbSleep_SecSleep(3);
+
+ if (res.insertErrorInNode(node1, 0))
+ return NDBT_FAILED;
+
+ if (res.waitNodesNoStart(&node0, 1))
+ return NDBT_FAILED;
+
+ if (res.startNodes(&node0, 1))
+ return NDBT_FAILED;
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
return NDBT_OK;
}
@@ -1992,6 +2071,9 @@
}
TESTCASE("Bug28023", ""){
INITIALIZER(runBug28023);
+}
+TESTCASE("Bug28717", ""){
+ INITIALIZER(runBug28717);
}
NDBT_TESTSUITE_END(testNodeRestart);
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2511) | jonas | 29 May |