diff options
author | unknown <pekka@orca.ndb.mysql.com> | 2006-07-10 13:59:13 +0200 |
---|---|---|
committer | unknown <pekka@orca.ndb.mysql.com> | 2006-07-10 13:59:13 +0200 |
commit | 001c7f5fe1564c8b1bb47d20f70becf2775985b6 (patch) | |
tree | 3169e48769039c1ae54399d81707f07a27f42461 /ndb | |
parent | f98f5d639bc64d5b1346f7a1b9ea661d32e50710 (diff) | |
download | mariadb-git-001c7f5fe1564c8b1bb47d20f70becf2775985b6.tar.gz |
ndb - bug#18781: close a tiny window (re-commit, try to by-pass merge jam)
ndb/src/kernel/blocks/dbdict/DictLock.txt:
wait until SL_STARTED before sending DICT_UNLOCK_ORD
ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
wait until SL_STARTED before sending DICT_UNLOCK_ORD
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
wait until SL_STARTED before sending DICT_UNLOCK_ORD
ndb/src/kernel/vm/SimulatedBlock.cpp:
wait until SL_STARTED before sending DICT_UNLOCK_ORD
ndb/src/kernel/vm/SimulatedBlock.hpp:
wait until SL_STARTED before sending DICT_UNLOCK_ORD
ndb/test/run-test/daily-basic-tests.txt:
wait until SL_STARTED before sending DICT_UNLOCK_ORD
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/kernel/blocks/dbdict/DictLock.txt | 12 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbdih/Dbdih.hpp | 3 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 40 | ||||
-rw-r--r-- | ndb/src/kernel/vm/SimulatedBlock.cpp | 9 | ||||
-rw-r--r-- | ndb/src/kernel/vm/SimulatedBlock.hpp | 1 | ||||
-rw-r--r-- | ndb/test/run-test/daily-basic-tests.txt | 4 |
6 files changed, 47 insertions, 22 deletions
diff --git a/ndb/src/kernel/blocks/dbdict/DictLock.txt b/ndb/src/kernel/blocks/dbdict/DictLock.txt index 17f24119e9d..72e23ed15a5 100644 --- a/ndb/src/kernel/blocks/dbdict/DictLock.txt +++ b/ndb/src/kernel/blocks/dbdict/DictLock.txt @@ -85,10 +85,14 @@ DIH/s START_MECONF DIH/s -* sp7 - release DICT lock +* (copy data, omitted) -DIH/s - DICT_UNLOCK_ORD - DICT/m +* SL_STARTED - release DICT lock + +CNTR/s + NODE_START_REP + DIH/s + DICT_UNLOCK_ORD + DICT/m # vim: set et sw=4: diff --git a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp index f4a33df9805..5c2cfac5eb1 100644 --- a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp +++ b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp @@ -1599,6 +1599,9 @@ private: */ 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 * during NR. A pool of slave records is convenient anyway. diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 352053bef10..50d5c6b660f 100644 --- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -1356,24 +1356,6 @@ void Dbdih::execNDB_STTOR(Signal* signal) } ndbrequire(false); 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: jam(); ndbsttorry10Lab(signal, __LINE__); @@ -1382,6 +1364,27 @@ void Dbdih::execNDB_STTOR(Signal* signal) }//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 Dbdih::createMutexes(Signal * signal, Uint32 count){ Callback c = { safe_cast(&Dbdih::createMutex_done), count }; @@ -1605,6 +1608,7 @@ void Dbdih::nodeRestartPh2Lab(Signal* signal) void Dbdih::recvDictLockConf_nodeRestart(Signal* signal, Uint32 data, Uint32 ret) { ndbrequire(c_dictLockSlavePtrI_nodeRestart == RNIL); + ndbrequire(data != RNIL); c_dictLockSlavePtrI_nodeRestart = data; nodeRestartPh2Lab2(signal); diff --git a/ndb/src/kernel/vm/SimulatedBlock.cpp b/ndb/src/kernel/vm/SimulatedBlock.cpp index bbf13528c5c..b4787209d55 100644 --- a/ndb/src/kernel/vm/SimulatedBlock.cpp +++ b/ndb/src/kernel/vm/SimulatedBlock.cpp @@ -917,6 +917,15 @@ SimulatedBlock::execCONTINUE_FRAGMENTED(Signal * signal){ 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 diff --git a/ndb/src/kernel/vm/SimulatedBlock.hpp b/ndb/src/kernel/vm/SimulatedBlock.hpp index f7ca4ecbf38..4a3620a00ab 100644 --- a/ndb/src/kernel/vm/SimulatedBlock.hpp +++ b/ndb/src/kernel/vm/SimulatedBlock.hpp @@ -424,6 +424,7 @@ private: void execSIGNAL_DROPPED_REP(Signal* signal); void execCONTINUE_FRAGMENTED(Signal* signal); void execNODE_START_REP(Signal* signal); + virtual void exec_node_start_rep(Signal* signal); Uint32 c_fragmentIdCounter; ArrayPool<FragmentInfo> c_fragmentInfoPool; diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt index 6077c9fb536..094c1edede6 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -500,6 +500,10 @@ max-time: 1500 cmd: testDict args: -n TemporaryTables T1 T6 T7 T8 +max-time: 1500 +cmd: testDict +args: -n Restart_NR2 T1 + # # TEST NDBAPI # |