#At file:///home/tomas/mysql_src/mysql-5.1-telco-6.3/
2801 Tomas Ulin 2008-12-16
bump up version
modified:
configure.in
storage/ndb/src/ndbapi/ClusterMgr.cpp
storage/ndb/src/ndbapi/ClusterMgr.hpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
storage/ndb/src/ndbapi/Ndbif.cpp
=== modified file 'configure.in'
--- a/configure.in 2008-11-21 21:16:23 +0000
+++ b/configure.in 2008-12-16 20:53:03 +0000
@@ -10,12 +10,12 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
-AM_INIT_AUTOMAKE(mysql, 5.1.30-ndb-6.3.20)
+AM_INIT_AUTOMAKE(mysql, 5.1.30-ndb-6.3.21)
AM_CONFIG_HEADER([include/config.h:config.h.in])
NDB_VERSION_MAJOR=6
NDB_VERSION_MINOR=3
-NDB_VERSION_BUILD=20
+NDB_VERSION_BUILD=21
NDB_VERSION_STATUS="-GA"
PROTOCOL_VERSION=10
=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.cpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp 2008-04-25 07:14:29 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp 2008-12-16 20:53:03 +0000
@@ -556,8 +556,7 @@ ClusterMgr::reportNodeFailed(NodeId node
theFacade.ReportNodeDead(nodeId);
}
- theNode.nfCompleteRep = false;
- if(noOfAliveNodes == 0)
+ if (noOfConnectedNodes == 0)
{
if (!global_flag_skip_invalidate_cache &&
theFacade.m_globalDictCache)
@@ -568,6 +567,10 @@ ClusterMgr::reportNodeFailed(NodeId node
m_connect_count ++;
m_cluster_state = CS_waiting_for_clean_cache;
}
+ }
+ theNode.nfCompleteRep = false;
+ if(noOfAliveNodes == 0)
+ {
NFCompleteRep rep;
for(Uint32 i = 1; i<MAX_NDB_NODES; i++){
if(theNodes[i].defined && theNodes[i].nfCompleteRep == false){
=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.hpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.hpp 2007-05-09 14:31:16 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.hpp 2008-12-16 20:53:03 +0000
@@ -85,7 +85,6 @@ public:
const Node & getNodeInfo(NodeId) const;
Uint32 getNoOfConnectedNodes() const;
- bool isClusterAlive() const;
void hb_received(NodeId);
Uint32 m_connect_count;
@@ -144,11 +143,6 @@ ClusterMgr::getNoOfConnectedNodes() cons
return noOfConnectedNodes;
}
-inline
-bool
-ClusterMgr::isClusterAlive() const {
- return noOfAliveNodes != 0;
-}
inline
void
ClusterMgr::hb_received(NodeId nodeId) {
=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2008-09-25 10:22:38 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2008-12-16 20:53:03 +0000
@@ -1080,6 +1080,8 @@ NdbEventBuffer::NdbEventBuffer(Ndb *ndb)
// initialize lists
bzero(&g_empty_gci_container, sizeof(Gci_container));
init_gci_containers();
+
+ m_alive_node_bit_mask.clear();
}
NdbEventBuffer::~NdbEventBuffer()
@@ -1838,6 +1840,8 @@ void
NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep,
Uint32 len)
{
+ m_alive_node_bit_mask.set(refToNode(rep->senderRef));
+
if (unlikely(m_active_op_count == 0))
{
return;
@@ -2089,13 +2093,15 @@ NdbEventBuffer::report_node_connected(Ui
}
void
-NdbEventBuffer::report_node_failure(Uint32 node_id)
+NdbEventBuffer::report_node_failure_completed(Uint32 node_id)
{
+ m_alive_node_bit_mask.clear(node_id);
+
NdbEventOperation* op= m_ndb->getEventOperation(0);
if (op == 0)
return;
- DBUG_ENTER("NdbEventBuffer::report_node_failure");
+ DBUG_ENTER("NdbEventBuffer::report_node_failure_completed");
SubTableData data;
LinearSectionPtr ptr[3];
bzero(&data, sizeof(data));
@@ -2120,6 +2126,10 @@ NdbEventBuffer::report_node_failure(Uint
*/
// no need to lock()/unlock(), receive thread calls this
insert_event(&op->m_impl, data, ptr, data.senderData);
+
+ if (m_alive_node_bit_mask.isclear())
+ completeClusterFailed();
+
DBUG_VOID_RETURN;
}
=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2008-02-11 13:24:17 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2008-12-16 20:53:03 +0000
@@ -532,7 +532,7 @@ public:
void complete_outof_order_gcis();
void report_node_connected(Uint32 node_id);
- void report_node_failure(Uint32 node_id);
+ void report_node_failure_completed(Uint32 node_id);
void completeClusterFailed();
// used by user thread
@@ -664,6 +664,8 @@ private:
void complete_bucket(Gci_container*);
bool find_max_known_gci(Uint64 * res) const;
void resize_known_gci();
+
+ Bitmask<(unsigned int)_NDB_NODE_BITMASK_SIZE> m_alive_node_bit_mask;
};
inline
=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp 2008-11-13 13:20:59 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp 2008-12-16 20:53:03 +0000
@@ -269,13 +269,7 @@ Ndb::report_node_failure_completed(Uint3
{
// node failed
// eventOperations in the ndb object should be notified
- theEventBuffer->report_node_failure(node_id);
- if(!theImpl->m_transporter_facade->theClusterMgr->isClusterAlive())
- {
- // cluster is unavailable,
- // eventOperations in the ndb object should be notified
- theEventBuffer->completeClusterFailed();
- }
+ theEventBuffer->report_node_failure_completed(node_id);
}
abortTransactionsAfterNodeFailure(node_id);
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (tomas.ulin:2801) | Tomas Ulin | 19 Dec |