Below is the list of changes that have just been committed into a local
5.0 repository of gni. When gni 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-06-27 09:36:59+08:00, gni@stripped +9 -0
BUG#17788 ndb_restore is too static in its behavior.
ndb/include/kernel/GlobalSignalNumbers.h@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +4 -3
add global signal number for starting LCP immediately
ndb/include/kernel/signaldata/LCP.hpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +56 -0
add signal data for GSN_START_LCPIMME_REQ,GSN_START_LCPIMME_CONF,GSN_START_LCPIMME_REF.
ndb/src/common/debugger/signaldata/SignalNames.cpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +3 -0
add singal name for GSN_START_LCPIMME_REQ, GSN_START_LCPIMME_CONF, GSN_START_LCPIMMEREF
ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +1 -0
add processing function for GSN_START_LCPIMME_REQ signal.
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +2 -1
add processing function for GSN_START_LCPIMME_REQ signal.
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +26 -0
implement processing function for GSN_START_LCPIMME_REQ signal.
ndb/src/kernel/blocks/dblqh/Dblqh.hpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +5 -0
add member variable and processing function for GSN_START_LCPIMME_CONF and GSN_START_LCPIMME_REF.
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +6 -1
add member variable and processing function for GSN_START_LCPIMME_CONF and GSN_START_LCPIMME_REF.
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-06-27 09:36:53+08:00, gni@stripped +35 -3
when redo log is full and lqh block doesn't start lcp now, send GSN_START_LCPIMME_REQ to master DIH.
implement processing fucntion for GSN_START_LCPIMME_CONF and GSN_START_LCPIMME_REF.
# 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: gni
# Host: dev3-221.dev.cn.tlan
# Root: /home/ngb/mysql/mysql-5.0/bug17788
--- 1.20/ndb/include/kernel/GlobalSignalNumbers.h 2007-06-27 09:37:06 +08:00
+++ 1.21/ndb/include/kernel/GlobalSignalNumbers.h 2007-06-27 09:37:06 +08:00
@@ -424,9 +424,10 @@
#define GSN_READ_CONFIG_REQ 334 /* new name for sizealt, local */
#define GSN_READ_CONFIG_CONF 335 /* new name for sizealt, local */
-/* 336 unused */
-/* 337 unused */
-/* 338 unused */
+#define GSN_START_LCPIMME_REQ 336
+#define GSN_START_LCPIMME_CONF 337
+#define GSN_START_LCPIMME_REF 338
+
#define GSN_OPEN_COMCONF 339
#define GSN_OPEN_COMREF 340
#define GSN_OPEN_COMREQ 341
--- 1.2/ndb/include/kernel/signaldata/LCP.hpp 2007-06-27 09:37:06 +08:00
+++ 1.3/ndb/include/kernel/signaldata/LCP.hpp 2007-06-27 09:37:06 +08:00
@@ -150,4 +150,60 @@
Uint32 lcpId;
};
+class StartLcpImmediatelyReq {
+ /**
+ * Sender(s)
+ */
+ friend class Dblqh;
+
+ /**
+ * Receiver(s)
+ */
+ friend class Dbdih;
+public:
+ STATIC_CONST( SignalLength = 1 );
+
+private:
+ Uint32 senderRef;
+};
+
+class StartLcpImmediatelyConf {
+ /**
+ * Sender(s)
+ */
+ friend class Dbdih;
+
+ /**
+ * Receiver(s)
+ */
+ friend class Dblqh;
+public:
+ STATIC_CONST( SignalLength = 1 );
+
+private:
+ Uint32 masterId;
+};
+
+class StartLcpImmediatelyRef {
+ /**
+ * Sender(s)
+ */
+ friend class Dbdih;
+
+ /**
+ * Receiver(s)
+ */
+ friend class Dblqh;
+public:
+ STATIC_CONST( SignalLength = 1 );
+
+ enum ErrorCode {
+ InProgress = 255,
+ NotMaster = 702
+ };
+
+private:
+ Uint32 errorCode;
+};
+
#endif
--- 1.13/ndb/src/common/debugger/signaldata/SignalNames.cpp 2007-06-27 09:37:06 +08:00
+++ 1.14/ndb/src/common/debugger/signaldata/SignalNames.cpp 2007-06-27 09:37:06 +08:00
@@ -298,6 +298,9 @@
,{ GSN_SHRINKCHECK2, "SHRINKCHECK2" }
,{ GSN_READ_CONFIG_REQ, "READ_CONFIG_REQ" }
,{ GSN_READ_CONFIG_CONF, "READ_CONFIG_CONF" }
+ ,{ GSN_START_LCPIMME_REQ, "START_LCPIMME_REQ" }
+ ,{ GSN_START_LCPIMME_CONF, "START_LCPIMME_CONF" }
+ ,{ GSN_START_LCPIMME_REF, "START_LCPIMME_REF" }
,{ GSN_SR_FRAGIDCONF, "SR_FRAGIDCONF" }
,{ GSN_SR_FRAGIDREF, "SR_FRAGIDREF" }
,{ GSN_SR_FRAGIDREQ, "SR_FRAGIDREQ" }
--- 1.20/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-06-27 09:37:06 +08:00
+++ 1.21/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-06-27 09:37:06 +08:00
@@ -634,6 +634,7 @@
void execLCP_FRAG_REP(Signal *);
void execLCP_COMPLETE_REP(Signal *);
void execSTART_LCP_REQ(Signal *);
+ void execSTART_LCPIMME_REQ(Signal *);
void execSTART_LCP_CONF(Signal *);
MutexHandle2<DIH_START_LCP_MUTEX> c_startLcpMutexHandle;
void startLcpMutex_locked(Signal* signal, Uint32, Uint32);
--- 1.16/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp 2007-06-27 09:37:06 +08:00
+++ 1.17/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp 2007-06-27 09:37:06 +08:00
@@ -182,7 +182,8 @@
addRecSignal(GSN_LCP_FRAG_REP, &Dbdih::execLCP_FRAG_REP);
addRecSignal(GSN_START_LCP_REQ, &Dbdih::execSTART_LCP_REQ);
addRecSignal(GSN_START_LCP_CONF, &Dbdih::execSTART_LCP_CONF);
-
+ addRecSignal(GSN_START_LCPIMME_REQ, &Dbdih::execSTART_LCPIMME_REQ);
+
addRecSignal(GSN_READ_CONFIG_REQ, &Dbdih::execREAD_CONFIG_REQ, true);
addRecSignal(GSN_UNBLO_DICTCONF, &Dbdih::execUNBLO_DICTCONF);
addRecSignal(GSN_COPY_ACTIVECONF, &Dbdih::execCOPY_ACTIVECONF);
--- 1.72/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-06-27 09:37:06 +08:00
+++ 1.73/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-06-27 09:37:06 +08:00
@@ -9433,6 +9433,32 @@
}//if
}//Dbdih::execCOPY_TABCONF()
+void Dbdih::execSTART_LCPIMME_REQ(Signal *signal)
+{
+ Uint32 tData0 = signal->theData[0];
+
+ StartLcpImmediatelyReq* req = (StartLcpImmediatelyReq*)signal->getDataPtr();
+ BlockReference senderRef = req->senderRef;
+
+ if (!isMaster()) {
+ StartLcpImmediatelyRef*
+ ref = (StartLcpImmediatelyRef*)signal->getDataPtrSend();
+ ref->errorCode = StartLcpImmediatelyRef::NotMaster;
+ sendSignal(senderRef, GSN_START_LCPIMME_REF,
+ signal, StartLcpImmediatelyRef::SignalLength, JBB);
+ signal->theData[0] = tData0;
+ return;
+ }
+ c_lcpState.ctimer += (1 << c_lcpState.clcpDelay);
+ StartLcpImmediatelyConf*
+ conf = (StartLcpImmediatelyConf*)signal->getDataPtrSend();
+ conf->masterId = getOwnNodeId();
+ sendSignal(senderRef, GSN_START_LCPIMME_CONF,
+ signal, StartLcpImmediatelyConf::SignalLength, JBB);
+ signal->theData[0] = tData0;
+ return;
+}
+
/*
3.13 L O C A L C H E C K P O I N T (M A S T E R)
****************************************************
--- 1.46/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2007-06-27 09:37:06 +08:00
+++ 1.47/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2007-06-27 09:37:06 +08:00
@@ -2228,6 +2228,8 @@
void execTUX_ADD_ATTRCONF(Signal* signal);
void execTUX_ADD_ATTRREF(Signal* signal);
+ void execSTART_LCPIMME_CONF(Signal* signal);
+ void execSTART_LCPIMME_REF(Signal* signal);
// Statement blocks
void init_acc_ptr_list(ScanRecord*);
@@ -2749,6 +2751,9 @@
/*OF A LOCAL CHECKPOINT ROUND. */
/* ------------------------------------------------------------------------- */
LcpCloseState clcpCompletedState;
+/*WHETHER THE NEW ROUND LCP IS STARTED AFTER SEND GSN_START_LCPIMME_REQ
+*/
+ bool lcpStartImmeResponded;
/* ------------------------------------------------------------------------- */
/*DURING CONNECTION PROCESSES IN SYSTEM RESTART THESE VARIABLES KEEP TRACK */
/*OF HOW MANY CONNECTIONS AND RELEASES THAT ARE TO BE PERFORMED. */
--- 1.18/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp 2007-06-27 09:37:06 +08:00
+++ 1.19/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp 2007-06-27 09:37:06 +08:00
@@ -57,7 +57,7 @@
tablerec = 0;
tcConnectionrec = 0;
tcNodeFailRecord = 0;
-
+ lcpStartImmeResponded = true;
// Records with constant sizes
cLqhTimeOutCount = 0;
@@ -336,6 +336,11 @@
addRecSignal(GSN_UPDATE_FRAG_DIST_KEY_ORD,
&Dblqh::execUPDATE_FRAG_DIST_KEY_ORD);
+ addRecSignal(GSN_START_LCPIMME_CONF,
+ &Dblqh::execSTART_LCPIMME_CONF);
+ addRecSignal(GSN_START_LCPIMME_REF,
+ &Dblqh::execSTART_LCPIMME_REF);
+
initData();
#ifdef VM_TRACE
--- 1.104/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-06-27 09:37:07 +08:00
+++ 1.105/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-06-27 09:37:07 +08:00
@@ -4295,7 +4295,6 @@
signal->theData[1] = logPartPtr.i;
sendSignal(cownref, GSN_CONTINUEB, signal, 2, JBB);
}//if
-
terrorCode = ZTAIL_PROBLEM_IN_LOG_ERROR;
abortErrorLab(signal);
return;
@@ -4327,6 +4326,20 @@
if (regLogPartPtr->logPartState == LogPartRecord::TAIL_PROBLEM) {
jam();
terrorCode = ZTAIL_PROBLEM_IN_LOG_ERROR;
+ NodeId masterId = refToNode(cmasterDihBlockref);
+ if ((globalData.m_nodeInfo[masterId].m_version >= MAKE_VERSION(5,0,42)) &&
+ clcpCompletedState == LCP_IDLE &&
+ lcpStartImmeResponded) {
+ Uint32 Tdata0 = signal->theData[0];
+ StartLcpImmediatelyReq*
+ req = (StartLcpImmediatelyReq*)signal->getDataPtr();
+ req->senderRef = reference();
+ sendSignal(cmasterDihBlockref, GSN_START_LCPIMME_REQ,
+ signal, StartLcpImmediatelyReq::SignalLength, JBB);
+ lcpStartImmeResponded = false;
+ signal->theData[0] = Tdata0;
+ }
+
} else {
ndbrequire(regLogPartPtr->logPartState == LogPartRecord::FILE_CHANGE_PROBLEM);
jam();
@@ -11565,7 +11578,6 @@
{
UintR ToldTailFileNo = sltLogPartPtr.p->logTailFileNo;
UintR ToldTailMByte = sltLogPartPtr.p->logTailMbyte;
-
arrGuard(tsltMbyte, 16);
sltLogPartPtr.p->logTailFileNo =
sltLogFilePtr.p->logLastPrepRef[tsltMbyte] >> 16;
@@ -18488,6 +18500,26 @@
}//if
}//Dblqh::writeNextLog()
+void Dblqh::execSTART_LCPIMME_CONF(Signal* signal)
+{
+ jamEntry();
+ lcpStartImmeResponded = true;
+ return;
+}
+
+void Dblqh::execSTART_LCPIMME_REF(Signal* signal)
+{
+ jamEntry();
+ lcpStartImmeResponded = true;
+ StartLcpImmediatelyRef*
+ ref = (StartLcpImmediatelyRef*)signal->getDataPtrSend();
+ if (ref->errorCode == StartLcpImmediatelyRef::InProgress
+ || ref->errorCode == StartLcpImmediatelyRef::NotMaster){
+ ndbout_c("LQH:LCP started or START_LCPIMME_REQ to non-master DIH\n");
+ }
+ return;
+}
+
void
Dblqh::execDUMP_STATE_ORD(Signal* signal)
{
@@ -18706,7 +18738,7 @@
do
{
ptrCheckGuard(logFilePtr, clogFileFileSize, logFileRecord);
- ndbout_c(" file %d(%d) FileChangeState: %d logFileStatus: %d currentMbyte: %d currentFilepage",
+ ndbout_c(" file %d(%d) FileChangeState: %d logFileStatus: %d currentMbyte: %d currentFilepage: %d",
logFilePtr.p->fileNo,
logFilePtr.i,
logFilePtr.p->fileChangeState,
| Thread |
|---|
| • bk commit into 5.0 tree (gni:1.2473) BUG#17788 | gni | 27 Jun |