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.2241 06/07/04 17:37:44 tomas@stripped +6 -0
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
storage/ndb/src/ndbapi/TransporterFacade.cpp
1.51 06/07/04 17:37:33 tomas@stripped +3 -0
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
storage/ndb/src/ndbapi/Ndbif.cpp
1.42 06/07/04 17:37:33 tomas@stripped +15 -0
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
1.26 06/07/04 17:37:33 tomas@stripped +1 -0
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.64 06/07/04 17:37:33 tomas@stripped +40 -0
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
storage/ndb/src/ndbapi/ClusterMgr.cpp
1.28 06/07/04 17:37:33 tomas@stripped +3 -0
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
storage/ndb/src/kernel/blocks/suma/Suma.cpp
1.45 06/07/04 17:37:33 tomas@stripped +2 -1
Bug #20742 Assertion in drop of ndb binlog events after node restart
- make sure TE_ACTIVE event comes when node restarts so that ref counting is correct for drop of event
# 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/mysql-5.1-ndb
--- 1.44/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2006-06-28 08:41:32 +02:00
+++ 1.45/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2006-07-04 17:37:33 +02:00
@@ -2667,7 +2667,8 @@
{
SubTableData * data = (SubTableData*)signal->getDataPtrSend();
- if (table_event == NdbDictionary::Event::_TE_SUBSCRIBE)
+ if (table_event == NdbDictionary::Event::_TE_SUBSCRIBE &&
+ !c_startup.m_restart_server_node_id)
{
data->gci = m_last_complete_gci + 1;
data->tableId = subPtr.p->m_tableId;
--- 1.27/storage/ndb/src/ndbapi/ClusterMgr.cpp 2006-06-09 08:22:46 +02:00
+++ 1.28/storage/ndb/src/ndbapi/ClusterMgr.cpp 2006-07-04 17:37:33 +02:00
@@ -396,6 +396,8 @@
void
ClusterMgr::reportConnected(NodeId nodeId){
+ DBUG_ENTER("ClusterMgr::reportConnected");
+ DBUG_PRINT("info", ("nodeId: %u", nodeId));
/**
* Ensure that we are sending heartbeat every 100 ms
* until we have got the first reply from NDB providing
@@ -421,6 +423,7 @@
theNode.nfCompleteRep = true;
theFacade.ReportNodeAlive(nodeId);
+ DBUG_VOID_RETURN;
}
void
--- 1.63/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2006-07-03 12:11:53 +02:00
+++ 1.64/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2006-07-04 17:37:33 +02:00
@@ -1522,6 +1522,46 @@
}
void
+NdbEventBuffer::report_node_connected(Uint32 node_id)
+{
+ NdbEventOperation* op= m_ndb->getEventOperation(0);
+ if (op == 0)
+ return;
+
+ DBUG_ENTER("NdbEventBuffer::report_node_connected");
+ SubTableData data;
+ LinearSectionPtr ptr[3];
+ bzero(&data, sizeof(data));
+ bzero(ptr, sizeof(ptr));
+
+ data.tableId = ~0;
+ data.operation = NdbDictionary::Event::_TE_ACTIVE;
+ data.req_nodeid = (Uint8)node_id;
+ data.ndbd_nodeid = (Uint8)node_id;
+ data.logType = SubTableData::LOG;
+ data.gci = m_latestGCI + 1;
+ /**
+ * Insert this event for each operation
+ */
+ {
+ // no need to lock()/unlock(), receive thread calls this
+ NdbEventOperationImpl* impl = &op->m_impl;
+ do if (!impl->m_node_bit_mask.isclear())
+ {
+ data.senderData = impl->m_oid;
+ insertDataL(impl, &data, ptr);
+ } while((impl = impl->m_next));
+ for (impl = m_dropped_ev_op; impl; impl = impl->m_next)
+ if (!impl->m_node_bit_mask.isclear())
+ {
+ data.senderData = impl->m_oid;
+ insertDataL(impl, &data, ptr);
+ }
+ }
+ DBUG_VOID_RETURN;
+}
+
+void
NdbEventBuffer::report_node_failure(Uint32 node_id)
{
NdbEventOperation* op= m_ndb->getEventOperation(0);
--- 1.25/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2006-06-21 16:13:21 +02:00
+++ 1.26/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2006-07-04 17:37:33 +02:00
@@ -422,6 +422,7 @@
void execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep);
void complete_outof_order_gcis();
+ void report_node_connected(Uint32 node_id);
void report_node_failure(Uint32 node_id);
void completeClusterFailed();
--- 1.41/storage/ndb/src/ndbapi/Ndbif.cpp 2006-05-30 13:55:17 +02:00
+++ 1.42/storage/ndb/src/ndbapi/Ndbif.cpp 2006-07-04 17:37:33 +02:00
@@ -177,6 +177,7 @@
void Ndb::connected(Uint32 ref)
{
+// cluster connect, a_node == own reference
theMyRef= ref;
Uint32 tmpTheNode= refToNode(ref);
Uint64 tBlockNo= refToBlock(ref);
@@ -209,16 +210,30 @@
theNode= tmpTheNode; // flag that Ndb object is initialized
}
+void Ndb::report_node_connected(Uint32 nodeId)
+{
+ if (theEventBuffer)
+ {
+ // node connected
+ // eventOperations in the ndb object should be notified
+ theEventBuffer->report_node_connected(nodeId);
+ }
+}
+
void
Ndb::statusMessage(void* NdbObject, Uint32 a_node, bool alive, bool nfComplete)
{
DBUG_ENTER("Ndb::statusMessage");
+ DBUG_PRINT("info", ("a_node: %u alive: %u nfComplete: %u",
+ a_node, alive, nfComplete));
Ndb* tNdb = (Ndb*)NdbObject;
if (alive) {
if (nfComplete) {
+ // cluster connect, a_node == own reference
tNdb->connected(a_node);
DBUG_VOID_RETURN;
}//if
+ tNdb->report_node_connected(a_node);
} else {
if (nfComplete) {
tNdb->report_node_failure_completed(a_node);
--- 1.50/storage/ndb/src/ndbapi/TransporterFacade.cpp 2006-04-18 15:21:36 +02:00
+++ 1.51/storage/ndb/src/ndbapi/TransporterFacade.cpp 2006-07-04 17:37:33 +02:00
@@ -794,6 +794,8 @@
void
TransporterFacade::ReportNodeDead(NodeId tNodeId)
{
+ DBUG_ENTER("TransporterFacade::ReportNodeDead");
+ DBUG_PRINT("enter",("nodeid= %d", tNodeId));
/**
* When a node fails we must report this to each Ndb object.
* The function that is used for communicating node failures is called.
@@ -810,6 +812,7 @@
(*RegPC) (obj, tNodeId, false, false);
}
}
+ DBUG_VOID_RETURN;
}
void
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2241) BUG#20742 | tomas | 4 Jul |