Commit 72fa4883 authored by pekka@orca.ndb.mysql.com's avatar pekka@orca.ndb.mysql.com

Merge orca.ndb.mysql.com:/space_old/pekka/ndb/version/my50

into  orca.ndb.mysql.com:/space_old/pekka/ndb/version/my50-1.2167.1.2
parents 023f4435 9f3b47e5
...@@ -587,6 +587,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -587,6 +587,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_BLOCK_COMMIT_ORD 485 #define GSN_BLOCK_COMMIT_ORD 485
#define GSN_UNBLOCK_COMMIT_ORD 486 #define GSN_UNBLOCK_COMMIT_ORD 486
#define GSN_NODE_START_REP 502
#define GSN_NODE_STATE_REP 487 #define GSN_NODE_STATE_REP 487
#define GSN_CHANGE_NODE_STATE_REQ 488 #define GSN_CHANGE_NODE_STATE_REQ 488
#define GSN_CHANGE_NODE_STATE_CONF 489 #define GSN_CHANGE_NODE_STATE_CONF 489
......
...@@ -399,6 +399,8 @@ const GsnName SignalNames [] = { ...@@ -399,6 +399,8 @@ const GsnName SignalNames [] = {
,{ GSN_TUP_COM_UNBLOCK, "TUP_COM_UNBLOCK" } ,{ GSN_TUP_COM_UNBLOCK, "TUP_COM_UNBLOCK" }
,{ GSN_DUMP_STATE_ORD, "DUMP_STATE_ORD" } ,{ GSN_DUMP_STATE_ORD, "DUMP_STATE_ORD" }
,{ GSN_NODE_START_REP, "NODE_START_REP" }
,{ GSN_START_INFOREQ, "START_INFOREQ" } ,{ GSN_START_INFOREQ, "START_INFOREQ" }
,{ GSN_START_INFOREF, "START_INFOREF" } ,{ GSN_START_INFOREF, "START_INFOREF" }
,{ GSN_START_INFOCONF, "START_INFOCONF" } ,{ GSN_START_INFOCONF, "START_INFOCONF" }
......
...@@ -85,10 +85,14 @@ DIH/s ...@@ -85,10 +85,14 @@ DIH/s
START_MECONF START_MECONF
DIH/s DIH/s
* sp7 - release DICT lock * (copy data, omitted)
DIH/s * SL_STARTED - release DICT lock
DICT_UNLOCK_ORD
DICT/m CNTR/s
NODE_START_REP
DIH/s
DICT_UNLOCK_ORD
DICT/m
# vim: set et sw=4: # vim: set et sw=4:
...@@ -1599,6 +1599,9 @@ private: ...@@ -1599,6 +1599,9 @@ private:
*/ */
void startInfoReply(Signal *, Uint32 nodeId); void startInfoReply(Signal *, Uint32 nodeId);
// DIH specifics for execNODE_START_REP (sendDictUnlockOrd)
void exec_node_start_rep(Signal* signal);
/* /*
* Lock master DICT. Only current use is by starting node * Lock master DICT. Only current use is by starting node
* during NR. A pool of slave records is convenient anyway. * during NR. A pool of slave records is convenient anyway.
......
...@@ -1356,24 +1356,6 @@ void Dbdih::execNDB_STTOR(Signal* signal) ...@@ -1356,24 +1356,6 @@ void Dbdih::execNDB_STTOR(Signal* signal)
} }
ndbrequire(false); ndbrequire(false);
break; break;
case ZNDB_SPH7:
jam();
switch (typestart) {
case NodeState::ST_INITIAL_START:
case NodeState::ST_SYSTEM_RESTART:
jam();
ndbsttorry10Lab(signal, __LINE__);
return;
case NodeState::ST_NODE_RESTART:
case NodeState::ST_INITIAL_NODE_RESTART:
jam();
sendDictUnlockOrd(signal, c_dictLockSlavePtrI_nodeRestart);
c_dictLockSlavePtrI_nodeRestart = RNIL;
ndbsttorry10Lab(signal, __LINE__);
return;
}
ndbrequire(false);
break;
default: default:
jam(); jam();
ndbsttorry10Lab(signal, __LINE__); ndbsttorry10Lab(signal, __LINE__);
...@@ -1381,6 +1363,27 @@ void Dbdih::execNDB_STTOR(Signal* signal) ...@@ -1381,6 +1363,27 @@ void Dbdih::execNDB_STTOR(Signal* signal)
}//switch }//switch
}//Dbdih::execNDB_STTOR() }//Dbdih::execNDB_STTOR()
void
Dbdih::exec_node_start_rep(Signal* signal)
{
/*
* Send DICT_UNLOCK_ORD when this node is SL_STARTED.
*
* Sending it before (sp 7) conflicts with code which assumes
* SL_STARTING means we are in copy phase of NR.
*
* NodeState::starting.restartType is not supposed to be used
* when SL_STARTED. Also it seems NODE_START_REP can arrive twice.
*
* For these reasons there are no consistency checks and
* we rely on c_dictLockSlavePtrI_nodeRestart alone.
*/
if (c_dictLockSlavePtrI_nodeRestart != RNIL) {
sendDictUnlockOrd(signal, c_dictLockSlavePtrI_nodeRestart);
c_dictLockSlavePtrI_nodeRestart = RNIL;
}
}
void void
Dbdih::createMutexes(Signal * signal, Uint32 count){ Dbdih::createMutexes(Signal * signal, Uint32 count){
Callback c = { safe_cast(&Dbdih::createMutex_done), count }; Callback c = { safe_cast(&Dbdih::createMutex_done), count };
...@@ -1605,6 +1608,7 @@ void Dbdih::nodeRestartPh2Lab(Signal* signal) ...@@ -1605,6 +1608,7 @@ void Dbdih::nodeRestartPh2Lab(Signal* signal)
void Dbdih::recvDictLockConf_nodeRestart(Signal* signal, Uint32 data, Uint32 ret) void Dbdih::recvDictLockConf_nodeRestart(Signal* signal, Uint32 data, Uint32 ret)
{ {
ndbrequire(c_dictLockSlavePtrI_nodeRestart == RNIL); ndbrequire(c_dictLockSlavePtrI_nodeRestart == RNIL);
ndbrequire(data != RNIL);
c_dictLockSlavePtrI_nodeRestart = data; c_dictLockSlavePtrI_nodeRestart = data;
nodeRestartPh2Lab2(signal); nodeRestartPh2Lab2(signal);
......
...@@ -591,6 +591,13 @@ Ndbcntr::execCNTR_START_REP(Signal* signal){ ...@@ -591,6 +591,13 @@ Ndbcntr::execCNTR_START_REP(Signal* signal){
Uint32 nodeId = signal->theData[0]; Uint32 nodeId = signal->theData[0];
c_startedNodes.set(nodeId); c_startedNodes.set(nodeId);
c_start.m_starting.clear(nodeId); c_start.m_starting.clear(nodeId);
/**
* Inform all interested blocks that node has started
*/
for(Uint32 i = 0; i<ALL_BLOCKS_SZ; i++){
sendSignal(ALL_BLOCKS[i].Ref, GSN_NODE_START_REP, signal, 1, JBB);
}
if(!c_start.m_starting.isclear()){ if(!c_start.m_starting.isclear()){
jam(); jam();
......
...@@ -148,6 +148,7 @@ SimulatedBlock::installSimulatedBlockFunctions(){ ...@@ -148,6 +148,7 @@ SimulatedBlock::installSimulatedBlockFunctions(){
a[GSN_FSREMOVEREF] = &SimulatedBlock::execFSREMOVEREF; a[GSN_FSREMOVEREF] = &SimulatedBlock::execFSREMOVEREF;
a[GSN_FSSYNCREF] = &SimulatedBlock::execFSSYNCREF; a[GSN_FSSYNCREF] = &SimulatedBlock::execFSSYNCREF;
a[GSN_FSAPPENDREF] = &SimulatedBlock::execFSAPPENDREF; a[GSN_FSAPPENDREF] = &SimulatedBlock::execFSAPPENDREF;
a[GSN_NODE_START_REP] = &SimulatedBlock::execNODE_START_REP;
} }
void void
...@@ -913,6 +914,20 @@ SimulatedBlock::execCONTINUE_FRAGMENTED(Signal * signal){ ...@@ -913,6 +914,20 @@ SimulatedBlock::execCONTINUE_FRAGMENTED(Signal * signal){
sendSignal(reference(), GSN_CONTINUE_FRAGMENTED, signal, 1, JBB); sendSignal(reference(), GSN_CONTINUE_FRAGMENTED, signal, 1, JBB);
} }
void
SimulatedBlock::execNODE_START_REP(Signal* signal)
{
// common stuff for all blocks
// block specific stuff by virtual method override (default empty)
exec_node_start_rep(signal);
}
void
SimulatedBlock::exec_node_start_rep(Signal* signal)
{
}
#ifdef VM_TRACE_TIME #ifdef VM_TRACE_TIME
void void
SimulatedBlock::clearTimes() { SimulatedBlock::clearTimes() {
......
...@@ -423,6 +423,8 @@ private: ...@@ -423,6 +423,8 @@ private:
void execSIGNAL_DROPPED_REP(Signal* signal); void execSIGNAL_DROPPED_REP(Signal* signal);
void execCONTINUE_FRAGMENTED(Signal* signal); void execCONTINUE_FRAGMENTED(Signal* signal);
void execNODE_START_REP(Signal* signal);
virtual void exec_node_start_rep(Signal* signal);
Uint32 c_fragmentIdCounter; Uint32 c_fragmentIdCounter;
ArrayPool<FragmentInfo> c_fragmentInfoPool; ArrayPool<FragmentInfo> c_fragmentInfoPool;
......
...@@ -504,6 +504,10 @@ max-time: 1500 ...@@ -504,6 +504,10 @@ max-time: 1500
cmd: testDict cmd: testDict
args: -n TemporaryTables T1 T6 T7 T8 args: -n TemporaryTables T1 T6 T7 T8
max-time: 1500
cmd: testDict
args: -n Restart_NR2 T1
# #
# TEST NDBAPI # TEST NDBAPI
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment