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, 2006-12-20 15:12:38+01:00, jonas@stripped +2 -0
ndb -
Add possibility to disable arbitration by setting arbitrationrank=0 on all nodes
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp@stripped, 2006-12-20 15:12:37+01:00,
jonas@stripped +1 -0
Add possibility to disable arbitration by setting arbitrationrank=0 on all nodes
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2006-12-20 15:12:37+01:00,
jonas@stripped +36 -3
Add possibility to disable arbitration by setting arbitrationrank=0 on all nodes
# 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/mysql-5.1-wl2325-5.0-drop6
--- 1.14/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2006-12-20 15:12:42 +01:00
+++ 1.15/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2006-12-20 15:12:42 +01:00
@@ -183,6 +183,7 @@
NdbNodeBitmask newMask; // new nodes to process in RUN state
Uint8 sendCount; // control send/recv of signals
Uint8 recvCount;
+ Uint8 m_disabled;
NdbNodeBitmask recvMask; // left to recv
Uint32 code; // code field from signal
Uint32 failureNr; // cfailureNr at arbitration start
--- 1.32/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2006-12-20 15:12:42 +01:00
+++ 1.33/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2006-12-20 15:12:42 +01:00
@@ -269,7 +269,18 @@
* we have all nodes (or a winning majority).
*/
if (cpresident == getOwnNodeId())
- handleArbitStart(signal);
+ {
+ if (arbitRec.m_disabled == false)
+ {
+ jam();
+ handleArbitStart(signal);
+ }
+ else
+ {
+ jam();
+ infoEvent("Arbitration disabled");
+ }
+ }
break;
}
@@ -2076,9 +2087,11 @@
setHbApiDelay(hbDBAPI);
setArbitTimeout(arbitTimeout);
+ arbitRec.m_disabled = false;
arbitRec.state = ARBIT_NULL; // start state for all nodes
arbitRec.apiMask[0].clear(); // prepare for ARBIT_CFG
+ Uint32 sum = 0;
ArbitSignalData* const sd = (ArbitSignalData*)&signal->theData[0];
for (unsigned rank = 1; rank <= 2; rank++) {
sd->sender = getOwnNodeId();
@@ -2097,9 +2110,19 @@
sd->mask.set(nodeId);
}
}
-
+ sum += sd->mask.count();
execARBIT_CFG(signal);
}
+
+ if (sum == 0)
+ {
+ jam();
+ /**
+ * Disabled arbitration
+ */
+ arbitRec.m_disabled = true;
+ }
+
setNodeInfo(getOwnNodeId()).m_version = NDB_VERSION;
}//Qmgr::initData()
@@ -3226,7 +3249,17 @@
*/
return;
}
- handleArbitCheck(signal);
+
+ if (arbitRec.m_disabled == false)
+ {
+ jam();
+ handleArbitCheck(signal);
+ }
+ else
+ {
+ jam();
+ sendCommitFailReq(signal);
+ }
return;
}//Qmgr::execPREP_FAILCONF()
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2087) | jonas | 20 Dec |