From: Date: January 19 2007 6:35pm Subject: bk commit into 5.1 tree (jonas:1.2091) BUG#19645 List-Archive: http://lists.mysql.com/commits/18459 X-Bug: 19645 Message-Id: <20070119173530.C430169C0CD@perch.ndb.mysql.com> 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-01-19 18:35:27+01:00, jonas@stripped +5 -0 ndb - bug#19645 fix bug with hanging node in sp100 (mysql-5.1-wl2325-5.0) configure.in@stripped, 2007-01-19 18:35:25+01:00, jonas@stripped +3 -3 update version no storage/ndb/include/ndb_version.h.in@stripped, 2007-01-19 18:35:25+01:00, jonas@stripped +1 -0 define for broadcasted API_FAILREQ storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp@stripped, 2007-01-19 18:35:25+01:00, jonas@stripped +1 -0 broadcast API_FAILREQ to avoid partially connected apis which can confuse replication storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp@stripped, 2007-01-19 18:35:25+01:00, jonas@stripped +1 -0 broadcast API_FAILREQ to avoid partially connected apis which can confuse replication storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2007-01-19 18:35:25+01:00, jonas@stripped +29 -0 broadcast API_FAILREQ to avoid partially connected apis which can confuse replication # 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/drop5 --- 1.326/configure.in 2007-01-19 18:35:30 +01:00 +++ 1.327/configure.in 2007-01-19 18:35:30 +01:00 @@ -7,7 +7,7 @@ AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # Don't forget to also update the NDB lines below. -AM_INIT_AUTOMAKE(mysql, 5.1.3-a_drop5p17c) +AM_INIT_AUTOMAKE(mysql, 5.1.4-a_drop5p18) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -18,8 +18,8 @@ # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=1 -NDB_VERSION_BUILD=3 -NDB_VERSION_STATUS="a_drop5p17c" +NDB_VERSION_BUILD=4 +NDB_VERSION_STATUS="a_drop5p18" # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 --- 1.5/storage/ndb/include/ndb_version.h.in 2007-01-19 18:35:30 +01:00 +++ 1.6/storage/ndb/include/ndb_version.h.in 2007-01-19 18:35:30 +01:00 @@ -58,6 +58,7 @@ /*#define NDB_VERSION_ID 0*/ #define NDBD_NODE_VERSION_REP MAKE_VERSION(5,1,3) +#define NDBD_QMGR_APIFAIL_REQ MAKE_VERSION(5,1,4) #endif --- 1.15/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2007-01-19 18:35:30 +01:00 +++ 1.16/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2007-01-19 18:35:30 +01:00 @@ -248,6 +248,7 @@ void execAPI_FAILCONF(Signal* signal); void execREAD_NODESREQ(Signal* signal); void execSET_VAR_REQ(Signal* signal); + void execAPI_FAILREQ(Signal* signal); void execREAD_NODESREF(Signal* signal); void execREAD_NODESCONF(Signal* signal); --- 1.11/storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp 2007-01-19 18:35:30 +01:00 +++ 1.12/storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp 2007-01-19 18:35:30 +01:00 @@ -88,6 +88,7 @@ addRecSignal(GSN_API_REGREQ, &Qmgr::execAPI_REGREQ); addRecSignal(GSN_API_VERSION_REQ, &Qmgr::execAPI_VERSION_REQ); addRecSignal(GSN_DISCONNECT_REP, &Qmgr::execDISCONNECT_REP); + addRecSignal(GSN_API_FAILREQ, &Qmgr::execAPI_FAILREQ); addRecSignal(GSN_API_FAILCONF, &Qmgr::execAPI_FAILCONF); addRecSignal(GSN_READ_NODESREQ, &Qmgr::execREAD_NODESREQ); addRecSignal(GSN_SET_VAR_REQ, &Qmgr::execSET_VAR_REQ); --- 1.36/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-19 18:35:30 +01:00 +++ 1.37/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-19 18:35:30 +01:00 @@ -2368,6 +2368,9 @@ ndbrequire(failedNodePtr.p->failState == NORMAL); failedNodePtr.p->failState = WAITING_FOR_FAILCONF1; + NodeReceiverGroup rg(QMGR, c_clusterNodes); + rg.m_nodes.clear(getOwnNodeId()); + sendVersionedDb(rg, GSN_API_FAILREQ, signal, 2, JBA, NDBD_QMGR_APIFAIL_REQ); sendSignal(DBTC_REF, GSN_API_FAILREQ, signal, 2, JBA); sendSignal(DBDICT_REF, GSN_API_FAILREQ, signal, 2, JBA); sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA); @@ -2392,6 +2395,32 @@ sendSignal(CMVMI_REF, GSN_CLOSE_COMREQ, signal, CloseComReqConf::SignalLength, JBA); }//Qmgr::sendApiFailReq() + +void Qmgr::execAPI_FAILREQ(Signal* signal) +{ + jamEntry(); + NodeRecPtr failedNodePtr; + failedNodePtr.i = signal->theData[0]; + // signal->theData[1] == QMGR_REF + ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec); + + ndbrequire(getNodeInfo(failedNodePtr.i).getType() != NodeInfo::DB); + + // ignore if api not active + if (failedNodePtr.p->phase != ZAPI_ACTIVE) + { + jam(); + // But send to SUMA anyway... + sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA); + return; + } + + signal->theData[0] = NDB_LE_Disconnected; + signal->theData[1] = failedNodePtr.i; + sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); + + node_failed(signal, failedNodePtr.i); +} void Qmgr::execAPI_FAILCONF(Signal* signal) {