Below is the list of changes that have just been committed into a local
5.0 repository of tomas. When tomas 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-05-09 15:03:01+02:00, tomas@stripped +3 -0
enable setting api reg req frequency to be higher than heartbeat setting to ensure we
have reasonably up-to-date info from ndb nodes
+ do this for management server
ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2007-05-09 15:02:59+02:00,
tomas@stripped +10 -0
enable setting api reg req frequency to be higher than heartbeat setting to ensure we
have reasonably up-to-date info from ndb nodes
+ do this for management server
ndb/src/ndbapi/ClusterMgr.cpp@stripped, 2007-05-09 15:02:59+02:00,
tomas@stripped +4 -9
enable setting api reg req frequency to be higher than heartbeat setting to ensure we
have reasonably up-to-date info from ndb nodes
+ do this for management server
ndb/src/ndbapi/ClusterMgr.hpp@stripped, 2007-05-09 15:02:59+02:00,
tomas@stripped +2 -0
enable setting api reg req frequency to be higher than heartbeat setting to ensure we
have reasonably up-to-date info from ndb nodes
+ do this for management server
# 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: tomas
# Host: whalegate.ndb.mysql.com
# Root: /home/tomas/mysql-5.0-ndb
--- 1.116/ndb/src/mgmsrv/MgmtSrvr.cpp 2007-03-21 09:06:11 +01:00
+++ 1.117/ndb/src/mgmsrv/MgmtSrvr.cpp 2007-05-09 15:02:59 +02:00
@@ -627,6 +627,16 @@
ndbout_c("This is probably a bug.");
}
+ /*
+ set api reg req frequency quite high:
+
+ 100 ms interval to make sure we have fairly up-to-date
+ info from the nodes. This to make sure that this info
+ is not dependent on heart beat settings in the
+ configuration
+ */
+ theFacade->theClusterMgr->set_max_api_reg_req_interval(100);
+
TransporterRegistry *reg = theFacade->get_registry();
for(unsigned int i=0;i<reg->m_transporter_interface.size();i++) {
BaseString msg;
--- 1.33/ndb/src/ndbapi/ClusterMgr.cpp 2007-03-07 04:46:37 +01:00
+++ 1.34/ndb/src/ndbapi/ClusterMgr.cpp 2007-05-09 15:02:59 +02:00
@@ -68,6 +68,7 @@
clusterMgrThreadMutex = NdbMutex_Create();
waitForHBCond= NdbCondition_Create();
waitingForHB= false;
+ m_max_api_reg_req_interval= 0xFFFFFFFF; // MAX_INT
noOfAliveNodes= 0;
noOfConnectedNodes= 0;
theClusterMgrThread= 0;
@@ -251,7 +252,7 @@
* Start of Secure area for use of Transporter
*/
theFacade.lock_mutex();
- for (int i = 1; i < MAX_NODES; i++){
+ for (int i = 1; i < MAX_NDB_NODES; i++){
/**
* Send register request (heartbeat) to all available nodes
* at specified timing intervals
@@ -272,7 +273,8 @@
}
theNode.hbCounter += timeSlept;
- if (theNode.hbCounter >= theNode.hbFrequency) {
+ if (theNode.hbCounter >= m_max_api_reg_req_interval ||
+ theNode.hbCounter >= theNode.hbFrequency) {
/**
* It is now time to send a new Heartbeat
*/
@@ -281,13 +283,6 @@
theNode.hbCounter = 0;
}
- /**
- * If the node is of type REP,
- * then the receiver of the signal should be API_CLUSTERMGR
- */
- if (theNode.m_info.m_type == NodeInfo::REP) {
- signal.theReceiversBlockNumber = API_CLUSTERMGR;
- }
#ifdef DEBUG_REG
ndbout_c("ClusterMgr: Sending API_REGREQ to node %d", (int)nodeId);
#endif
--- 1.17/ndb/src/ndbapi/ClusterMgr.hpp 2007-02-22 19:33:58 +01:00
+++ 1.18/ndb/src/ndbapi/ClusterMgr.hpp 2007-05-09 15:02:59 +02:00
@@ -50,6 +50,7 @@
void startThread();
void forceHB();
+ void set_max_api_reg_req_interval(unsigned int millisec) { m_max_api_reg_req_interval =
millisec; }
private:
void threadMain();
@@ -83,6 +84,7 @@
Uint32 m_connect_count;
private:
+ Uint32 m_max_api_reg_req_interval;
Uint32 noOfAliveNodes;
Uint32 noOfConnectedNodes;
Node theNodes[MAX_NODES];
| Thread |
|---|
| • bk commit into 5.0 tree (tomas:1.2478) | tomas | 9 May |