List:Internals« Previous MessageNext Message »
From:tomas Date:May 17 2005 4:31pm
Subject:bk commit into 5.1 tree (tomas:1.1863)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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
  1.1863 05/05/17 16:30:55 tomas@stripped +3 -0
  correted bug during cluster failure handeling of events

  storage/ndb/src/ndbapi/Ndbif.cpp
    1.44 05/05/17 16:30:50 tomas@stripped +11 -11
    correted bug during cluster failure handeling of events

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
    1.46 05/05/17 16:30:50 tomas@stripped +1 -0
    correted bug during cluster failure handeling of events

  storage/ndb/src/ndbapi/ClusterMgr.hpp
    1.8 05/05/17 16:30:50 tomas@stripped +7 -0
    added method to check if cluster is alive

# 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:	poseidon.ndb.mysql.com
# Root:	/home/tomas/wl2325-test

--- 1.7/storage/ndb/src/ndbapi/ClusterMgr.hpp	2005-05-11 00:28:34 +02:00
+++ 1.8/storage/ndb/src/ndbapi/ClusterMgr.hpp	2005-05-17 16:30:50 +02:00
@@ -78,6 +78,7 @@
   
   const Node &  getNodeInfo(NodeId) const;
   Uint32        getNoOfConnectedNodes() const;
+  bool          isClusterAlive() const;
   
 private:
   Uint32        noOfAliveNodes;
@@ -126,6 +127,12 @@
 Uint32
 ClusterMgr::getNoOfConnectedNodes() const {
   return noOfConnectedNodes;
+}
+
+inline
+bool
+ClusterMgr::isClusterAlive() const {
+  return noOfAliveNodes != 0;
 }
 
 /*****************************************************************************/

--- 1.45/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2005-05-13 04:51:55 +02:00
+++ 1.46/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2005-05-17 16:30:50 +02:00
@@ -834,6 +834,7 @@
 	  n_dropped_events+= m_received_data_count[0]-count;
 	  
 	  m_last_received_data[0]= prev_buf;
+	  m_last_received_data[0]->m_next= 0;
 	  m_received_data_count[0]= count;
 	}
       }

--- 1.43/storage/ndb/src/ndbapi/Ndbif.cpp	2005-05-13 04:51:55 +02:00
+++ 1.44/storage/ndb/src/ndbapi/Ndbif.cpp	2005-05-17 16:30:50 +02:00
@@ -252,17 +252,6 @@
    * This method is only called by ClusterMgr (via lots of methods)
    */
 
-  if (TransporterFacade::instance()->theClusterMgr->getNoOfConnectedNodes())
-  {
-    // cluster is unavailable, eventOperations in the ndb object should be notified
-    for(NdbEventOperation* op=getEventOperation(); op; op=getEventOperation(op))
-    {
-      if ( op->getState() == NdbEventOperation::EO_EXECUTING )
-	theEventBuffer->reportClusterFailed(&op->m_impl);
-    }
-    theEventBuffer->completeClusterFailed();
-  }
-
   theImpl->the_release_ind[node_id] = 1;
   // must come after
   theImpl->the_release_ind[0] = 1;
@@ -274,6 +263,17 @@
 void
 Ndb::report_node_failure_completed(Uint32 node_id)
 {
+  if (!TransporterFacade::instance()->theClusterMgr->isClusterAlive())
+  {
+    // cluster is unavailable, eventOperations in the ndb object should be notified
+    for(NdbEventOperation* op=getEventOperation(); op; op=getEventOperation(op))
+    {
+      if ( op->getState() == NdbEventOperation::EO_EXECUTING )
+	theEventBuffer->reportClusterFailed(&op->m_impl);
+    }
+    theEventBuffer->completeClusterFailed();
+  }
+
   abortTransactionsAfterNodeFailure(node_id);
 
 }//Ndb::report_node_failure_completed()
Thread
bk commit into 5.1 tree (tomas:1.1863)tomas17 May