MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:July 7 2006 7:39am
Subject:bk commit into 5.0 tree (stewart:1.2139) BUG#13985
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of stewart. When stewart 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-07-07 17:39:11+10:00, stewart@willster.(none) +1 -0
  BUG#13985 ndb_mgm "status" command can return incorrect data node status
  
  better support parallel show commands, hold mutex when touching waitForHBFromNodes

  ndb/src/ndbapi/ClusterMgr.cpp@stripped, 2006-07-07 17:39:04+10:00, stewart@willster.(none) +6 -5
    correctly serialize ::forceHB calls and hold mutex for whole time updating
    waitForHBFromNodes

# 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:	stewart
# Host:	willster.(none)
# Root:	/home/stewart/Documents/MySQL/5.0/bug13985

--- 1.23/ndb/src/ndbapi/ClusterMgr.cpp	2006-07-07 17:39:15 +10:00
+++ 1.24/ndb/src/ndbapi/ClusterMgr.cpp	2006-07-07 17:39:15 +10:00
@@ -172,6 +172,7 @@
 void
 ClusterMgr::forceHB(NodeBitmask waitFor)
 {
+    NdbMutex_Lock(waitForHBMutex);
     theFacade.lock_mutex();
     global_flag_send_heartbeat_now= 1;
 
@@ -204,7 +205,6 @@
 
     theFacade.unlock_mutex();
 
-    NdbMutex_Lock(waitForHBMutex);
     NdbCondition_WaitTimeout(waitForHBCond, waitForHBMutex, 1000);
     NdbMutex_Unlock(waitForHBMutex);
 #ifdef DEBUG_REG
@@ -400,13 +400,14 @@
   if (node.m_info.m_type != NodeInfo::REP) {
     node.hbFrequency = (apiRegConf->apiHeartbeatFrequency * 10) - 50;
   }
+
+  NdbMutex_Lock(waitForHBMutex);
   waitForHBFromNodes.clear(nodeId);
+
   if(waitForHBFromNodes.isclear())
-  {
-    NdbMutex_Lock(waitForHBMutex);
     NdbCondition_Signal(waitForHBCond);
-    NdbMutex_Unlock(waitForHBMutex);
-  }
+
+  NdbMutex_Unlock(waitForHBMutex);
 }
 
 void
Thread
bk commit into 5.0 tree (stewart:1.2139) BUG#13985Stewart Smith7 Jul