diff options
author | unknown <joreland@mysql.com> | 2005-04-12 13:36:43 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-04-12 13:36:43 +0200 |
commit | 583d38f3f7f39d8124ae5785d3217b1d08f39c6d (patch) | |
tree | e52b89cebb86feaaffea3e7d50ad24cdf21f8f08 /ndb | |
parent | 20b9946d9eb8c8d6727ef38c57a869b8e9d764c2 (diff) | |
download | mariadb-git-583d38f3f7f39d8124ae5785d3217b1d08f39c6d.tar.gz |
bug#9757 - ndb
Impl. stupid mgm lock against shutting down 2 nodes simultaniously
Add some more dump
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Impl. 2 new dump
1) to query nf handling state
2) that impl. sending of arbitrary signal...
to be used with extreme care
ndb/src/kernel/main.cpp:
enable critical and warnings in out file
ndb/src/mgmsrv/MgmtSrvr.cpp:
call handleStopReply on nfCompleteRep instead
ndb/src/mgmsrv/MgmtSrvr.hpp:
call handleStopReply on nfCompleteRep instead
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 45 | ||||
-rw-r--r-- | ndb/src/kernel/main.cpp | 2 | ||||
-rw-r--r-- | ndb/src/mgmsrv/MgmtSrvr.cpp | 13 | ||||
-rw-r--r-- | ndb/src/mgmsrv/MgmtSrvr.hpp | 2 |
4 files changed, 57 insertions, 5 deletions
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 0bc8351a9db..efd1740651c 100644 --- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -69,6 +69,9 @@ #include <signaldata/FsOpenReq.hpp> #include <DebuggerNames.hpp> +#include <EventLogger.hpp> +extern EventLogger g_eventLogger; + #define SYSFILE ((Sysfile *)&sysfileData[0]) #define RETURN_IF_NODE_NOT_ALIVE(node) \ @@ -13103,6 +13106,48 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal) } } } + + if(dumpState->args[0] == 7019 && signal->getLength() == 2) + { + char buf2[8+1]; + NodeRecordPtr nodePtr; + nodePtr.i = signal->theData[1]; + ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord); + infoEvent("NF Node %d tc: %d lqh: %d dih: %d dict: %d recNODE_FAILREP: %d", + nodePtr.i, + nodePtr.p->dbtcFailCompleted, + nodePtr.p->dblqhFailCompleted, + nodePtr.p->dbdihFailCompleted, + nodePtr.p->dbdictFailCompleted, + nodePtr.p->recNODE_FAILREP); + infoEvent(" m_NF_COMPLETE_REP: %s m_nodefailSteps: %s", + nodePtr.p->m_NF_COMPLETE_REP.getText(), + nodePtr.p->m_nodefailSteps.getText(buf2)); + } + + if(dumpState->args[0] == 7020 && signal->getLength() > 3) + { + Uint32 gsn= signal->theData[1]; + Uint32 block= signal->theData[2]; + Uint32 length= signal->length() - 3; + memmove(signal->theData, signal->theData+3, 4*length); + sendSignal(numberToRef(block, getOwnNodeId()), gsn, signal, length, JBB); + + warningEvent("-- SENDING CUSTOM SIGNAL --"); + char buf[100], buf2[100]; + buf2[0]= 0; + for(Uint32 i = 0; i<length; i++) + { + snprintf(buf, 100, "%s %.8x", buf2, signal->theData[i]); + snprintf(buf2, 100, "%s", buf); + } + warningEvent("gsn: %d block: %s, length: %d theData: %s", + gsn, getBlockName(block, "UNKNOWN"), length, buf); + + g_eventLogger.warning("-- SENDING CUSTOM SIGNAL --"); + g_eventLogger.warning("gsn: %d block: %s, length: %d theData: %s", + gsn, getBlockName(block, "UNKNOWN"), length, buf); + } if(dumpState->args[0] == DumpStateOrd::DihDumpLCPState){ infoEvent("-- Node %d LCP STATE --", getOwnNodeId()); diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp index e6e0a7ca877..1e5cd5270e4 100644 --- a/ndb/src/kernel/main.cpp +++ b/ndb/src/kernel/main.cpp @@ -58,7 +58,9 @@ int main(int argc, char** argv) // Print to stdout/console g_eventLogger.createConsoleHandler(); g_eventLogger.setCategory("NDB"); + g_eventLogger.enable(Logger::LL_ON, Logger::LL_CRITICAL); g_eventLogger.enable(Logger::LL_ON, Logger::LL_ERROR); + g_eventLogger.enable(Logger::LL_ON, Logger::LL_WARNING); globalEmulatorData.create(); diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index 3bc00b18f50..98cdcdca2f7 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -2061,7 +2061,7 @@ MgmtSrvr::handleStopReply(NodeId nodeId, Uint32 errCode) } void -MgmtSrvr::handleStatus(NodeId nodeId, bool alive) +MgmtSrvr::handleStatus(NodeId nodeId, bool alive, bool nfComplete) { DBUG_ENTER("MgmtSrvr::handleStatus"); Uint32 theData[25]; @@ -2070,9 +2070,15 @@ MgmtSrvr::handleStatus(NodeId nodeId, bool alive) m_started_nodes.push_back(nodeId); theData[0] = EventReport::Connected; } else { - handleStopReply(nodeId, 0); theData[0] = EventReport::Disconnected; + if(nfComplete) + { + theData[0] = EventReport::NodeFailCompleted; + handleStopReply(nodeId, 0); + return; + } } + eventReport(_ownNodeId, theData); DBUG_VOID_RETURN; } @@ -2097,8 +2103,7 @@ MgmtSrvr::nodeStatusNotification(void* mgmSrv, Uint32 nodeId, { DBUG_ENTER("MgmtSrvr::nodeStatusNotification"); DBUG_PRINT("enter",("nodeid= %d, alive= %d, nfComplete= %d", nodeId, alive, nfComplete)); - if(!(!alive && nfComplete)) - ((MgmtSrvr*)mgmSrv)->handleStatus(nodeId, alive); + ((MgmtSrvr*)mgmSrv)->handleStatus(nodeId, alive, nfComplete); DBUG_VOID_RETURN; } diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp index 6378e763363..a05b29b7f31 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.hpp +++ b/ndb/src/mgmsrv/MgmtSrvr.hpp @@ -573,7 +573,7 @@ private: // Returns: - //************************************************************************** - void handleStatus(NodeId nodeId, bool alive); + void handleStatus(NodeId nodeId, bool alive, bool nfComplete); //************************************************************************** // Description: Handle the death of a process // Parameters: |