Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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.1850 05/05/13 12:58:16 joreland@stripped +11 -0
wl1445 - ndb - consistent handling of NF wrt replication
storage/ndb/src/kernel/vm/SimulatedBlock.hpp
1.13 05/05/13 12:58:12 joreland@stripped +2 -1
NODE_START_REP
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
1.19 05/05/13 12:58:12 joreland@stripped +6 -0
NODE_START_REP
storage/ndb/src/kernel/blocks/suma/SumaInit.cpp
1.14 05/05/13 12:58:12 joreland@stripped +71 -82
1) Let starting suma coordinate restart (instead of running suma)
Assumption: starting is more clever + fail handling becomes trivial
2) remove Node, SubCoordinator, RtoI
Make Restart have only of nodeid
storage/ndb/src/kernel/blocks/suma/Suma.hpp
1.14 05/05/13 12:58:12 joreland@stripped +36 -93
1) Let starting suma coordinate restart (instead of running suma)
Assumption: starting is more clever + fail handling becomes trivial
2) remove Node, SubCoordinator, RtoI
Make Restart have only of nodeid
storage/ndb/src/kernel/blocks/suma/Suma.cpp
1.34 05/05/13 12:58:12 joreland@stripped +341 -405
1) Let starting suma coordinate restart (instead of running suma)
Assumption: starting is more clever + fail handling becomes trivial
2) remove Node, SubCoordinator, RtoI
Make Restart have only of nodeid
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
1.18 05/05/13 12:58:12 joreland@stripped +7 -0
NODE_START_REP
storage/ndb/include/kernel/signaldata/SumaImpl.hpp
1.9 05/05/13 12:58:12 joreland@stripped +89 -76
remove suma participant
storage/ndb/include/kernel/signaldata/DropTab.hpp
1.6 05/05/13 12:58:12 joreland@stripped +1 -1
remove suma participant
storage/ndb/include/kernel/signaldata/CreateTab.hpp
1.5 05/05/13 12:58:12 joreland@stripped +1 -1
remove suma participant
storage/ndb/include/kernel/signaldata/AlterTab.hpp
1.5 05/05/13 12:58:12 joreland@stripped +1 -1
remove suma participant
storage/ndb/include/kernel/GlobalSignalNumbers.h
1.12 05/05/13 12:58:12 joreland@stripped +9 -5
Add GSN_NODE_START_REP
for general info when a node has started
Add REF/CONF to SUMA_START_ME & SUMA_HANDOVER
# 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: joreland
# Host: eel.hemma.oreland.se
# Root: /home/jonas/src/mysql-5.1-wl2325
--- 1.11/storage/ndb/include/kernel/GlobalSignalNumbers.h Wed Apr 27 23:32:56 2005
+++ 1.12/storage/ndb/include/kernel/GlobalSignalNumbers.h Fri May 13 12:58:12 2005
@@ -592,6 +592,7 @@
#define GSN_BLOCK_COMMIT_ORD 485
#define GSN_UNBLOCK_COMMIT_ORD 486
+#define GSN_NODE_START_REP 502
#define GSN_NODE_STATE_REP 487
#define GSN_CHANGE_NODE_STATE_REQ 488
#define GSN_CHANGE_NODE_STATE_CONF 489
@@ -612,7 +613,7 @@
#define GSN_WAIT_GCP_REF 500
#define GSN_WAIT_GCP_CONF 501
-/* 502 not used */
+/* 502 used */
/**
* Trigger and index signals
@@ -903,13 +904,16 @@
/**
* SUMA restart protocol
*/
-#define GSN_SUMA_START_ME 691
+#define GSN_SUMA_START_ME_REQ 691
+#define GSN_SUMA_START_ME_REF 694
+#define GSN_SUMA_START_ME_CONF 695
#define GSN_SUMA_HANDOVER_REQ 692
+#define GSN_SUMA_HANDOVER_REF 696
#define GSN_SUMA_HANDOVER_CONF 693
-/* not used 694 */
-/* not used 695 */
-/* not used 696 */
+/* used 694 */
+/* used 695 */
+/* used 696 */
#define GSN_706
#define GSN_707
--- 1.4/storage/ndb/include/kernel/signaldata/AlterTab.hpp Wed Apr 27 23:32:56 2005
+++ 1.5/storage/ndb/include/kernel/signaldata/AlterTab.hpp Fri May 13 12:58:12 2005
@@ -103,7 +103,7 @@
friend class Dbtc;
friend class Dblqh;
friend class Dbtup;
- friend class SumaParticipant;
+ friend class Suma;
/**
* For printing
--- 1.4/storage/ndb/include/kernel/signaldata/CreateTab.hpp Wed Apr 27 23:32:56 2005
+++ 1.5/storage/ndb/include/kernel/signaldata/CreateTab.hpp Fri May 13 12:58:12 2005
@@ -91,7 +91,7 @@
* Sender(s) / Reciver(s)
*/
friend class Dbdict;
- friend class SumaParticipant;
+ friend class Suma;
/**
* For printing
--- 1.5/storage/ndb/include/kernel/signaldata/DropTab.hpp Wed Apr 27 23:32:56 2005
+++ 1.6/storage/ndb/include/kernel/signaldata/DropTab.hpp Fri May 13 12:58:12 2005
@@ -61,7 +61,7 @@
friend class Dbtup;
friend class Dbtux;
friend class Dbdih;
- friend class SumaParticipant;
+ friend class Suma;
/**
* Receiver(s)
--- 1.8/storage/ndb/include/kernel/signaldata/SumaImpl.hpp Wed Apr 27 23:32:56 2005
+++ 1.9/storage/ndb/include/kernel/signaldata/SumaImpl.hpp Fri May 13 12:58:12 2005
@@ -21,12 +21,12 @@
#include <NodeBitmask.hpp>
-class SubCreateReq {
+struct SubCreateReq {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
- friend class SumaParticipant;
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printSUB_CREATE_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -51,12 +51,12 @@
Uint32 tableId;
};
-class SubCreateRef {
+struct SubCreateRef {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
- friend class SumaParticipant;
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printSUB_CREATE_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -67,12 +67,12 @@
Uint32 errorCode;
};
-class SubCreateConf {
+struct SubCreateConf {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
- friend class SumaParticipant;
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printSUB_CREATE_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -82,7 +82,7 @@
Uint32 senderData;
};
-class SubscriptionData {
+struct SubscriptionData {
public:
enum Part {
MetaData = 1,
@@ -90,11 +90,11 @@
};
};
-class SubStartReq {
+struct SubStartReq {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
+ friend struct Suma;
friend bool printSUB_START_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -110,11 +110,11 @@
Uint32 subscriberRef;
};
-class SubStartRef {
+struct SubStartRef {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
+ friend struct Suma;
friend bool printSUB_START_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -139,11 +139,11 @@
Uint32 subscriberRef;
};
-class SubStartConf {
+struct SubStartConf {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
+ friend struct Grep;
friend bool printSUB_START_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -161,11 +161,11 @@
Uint32 subscriberRef;
};
-class SubStopReq {
+struct SubStopReq {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
+ friend struct Suma;
friend bool printSUB_STOP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -179,11 +179,11 @@
Uint32 subscriberRef;
};
-class SubStopRef {
+struct SubStopRef {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
+ friend struct Suma;
friend bool printSUB_STOP_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -205,11 +205,11 @@
Uint32 errorCode;
};
-class SubStopConf {
+struct SubStopConf {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
+ friend struct Grep;
friend bool printSUB_STOP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -224,12 +224,12 @@
Uint32 subscriberRef;
};
-class SubSyncReq {
+struct SubSyncReq {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
- friend class Grep;
+ friend struct Suma;
+ friend struct Grep;
friend bool printSUB_SYNC_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -246,12 +246,12 @@
SECTION( TABLE_LIST = 1 );
};
-class SubSyncRef {
+struct SubSyncRef {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
- friend class Grep;
+ friend struct Suma;
+ friend struct Grep;
friend bool printSUB_SYNC_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -265,13 +265,13 @@
Uint32 errorCode;
};
-class SubSyncConf {
+struct SubSyncConf {
/**
* Sender(s)/Reciver(s)
*/
- friend class Suma;
- friend class Grep;
+ friend struct Suma;
+ friend struct Grep;
friend bool printSUB_SYNC_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -281,12 +281,12 @@
Uint32 senderData;
};
-class SubMetaData {
+struct SubMetaData {
/**
* Sender(s)/Reciver(s)
*/
- friend class SumaParticipant;
- friend class Grep;
+ friend struct SumaParticipant;
+ friend struct Grep;
friend bool printSUB_META_DATA(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -298,12 +298,12 @@
Uint32 tableId;
};
-class SubTableData {
+struct SubTableData {
/**
* Sender(s)/Reciver(s)
*/
- friend class SumaParticipant;
- friend class Grep;
+ friend struct SumaParticipant;
+ friend struct Grep;
friend bool printSUB_TABLE_DATA(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -329,13 +329,13 @@
Uint32 logType;
};
-class SubSyncContinueReq {
+struct SubSyncContinueReq {
/**
* Sender(s)/Reciver(s)
*/
- friend class SumaParticipant;
- friend class Grep;
- friend class Trix;
+ friend struct SumaParticipant;
+ friend struct Grep;
+ friend struct Trix;
friend bool printSUB_SYNC_CONTINUE_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -345,13 +345,13 @@
Uint32 noOfRowsSent;
};
-class SubSyncContinueRef {
+struct SubSyncContinueRef {
/**
* Sender(s)/Reciver(s)
*/
- friend class SumaParticipant;
- friend class Grep;
- friend class Trix;
+ friend struct SumaParticipant;
+ friend struct Grep;
+ friend struct Trix;
friend bool printSUB_SYNC_CONTINUE_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -361,13 +361,13 @@
Uint32 subscriptionKey;
};
-class SubSyncContinueConf {
+struct SubSyncContinueConf {
/**
* Sender(s)/Reciver(s)
*/
- friend class SumaParticipant;
- friend class Grep;
- friend class Trix;
+ friend struct SumaParticipant;
+ friend struct Grep;
+ friend struct Trix;
friend bool printSUB_SYNC_CONTINUE_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -377,15 +377,15 @@
Uint32 subscriptionKey;
};
-class SubGcpCompleteRep {
+struct SubGcpCompleteRep {
/**
* Sender(s)/Reciver(s)
*/
- friend class Dbdih;
- friend class SumaParticipant;
- friend class Grep;
- friend class Trix;
+ friend struct Dbdih;
+ friend struct SumaParticipant;
+ friend struct Grep;
+ friend struct Trix;
friend bool printSUB_GCP_COMPLETE_REP(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -396,7 +396,7 @@
Uint32 senderData;
};
-class SubGcpCompleteAck {
+struct SubGcpCompleteAck {
/**
* Sender(s)/Reciver(s)
*/
@@ -406,12 +406,12 @@
SubGcpCompleteRep rep;
};
-class SubRemoveReq {
+struct SubRemoveReq {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
- friend class SumaParticipant;
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printSUB_REMOVE_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -423,12 +423,12 @@
Uint32 subscriptionKey;
};
-class SubRemoveRef {
+struct SubRemoveRef {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
- friend class SumaParticipant;
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printSUB_REMOVE_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -446,12 +446,12 @@
Uint32 senderData;
};
-class SubRemoveConf {
+struct SubRemoveConf {
/**
* Sender(s)/Reciver(s)
*/
- friend class Grep;
- friend class SumaParticipant;
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printSUB_REMOVE_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
@@ -465,9 +465,9 @@
};
-class CreateSubscriptionIdReq {
- friend class Grep;
- friend class SumaParticipant;
+struct CreateSubscriptionIdReq {
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printCREATE_SUBSCRIPTION_ID_REQ(FILE *, const Uint32 *,
Uint32, Uint16);
@@ -479,9 +479,9 @@
};
-class CreateSubscriptionIdConf {
- friend class Grep;
- friend class SumaParticipant;
+struct CreateSubscriptionIdConf {
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printCREATE_SUBSCRIPTION_ID_CONF(FILE *, const Uint32 *,
Uint32, Uint16);
@@ -495,9 +495,9 @@
};
-class CreateSubscriptionIdRef {
- friend class Grep;
- friend class SumaParticipant;
+struct CreateSubscriptionIdRef {
+ friend struct Grep;
+ friend struct SumaParticipant;
friend bool printCREATE_SUBSCRIPTION_ID_REF(FILE *, const Uint32 *,
Uint32, Uint16);
@@ -509,19 +509,32 @@
Uint32 errorCode;
};
-class SumaStartMe {
+struct SumaStartMeReq {
public:
STATIC_CONST( SignalLength = 1 );
Uint32 unused;
};
-class SumaHandoverReq {
+struct SumaStartMeRef {
+ STATIC_CONST( SignalLength = 1 );
+ Uint32 errorCode;
+ enum {
+ Busy = 0x1
+ };
+};
+
+struct SumaStartMeConf {
+ STATIC_CONST( SignalLength = 1 );
+ Uint32 unused;
+};
+
+struct SumaHandoverReq {
public:
STATIC_CONST( SignalLength = 1 );
Uint32 gci;
};
-class SumaHandoverConf {
+struct SumaHandoverConf {
public:
STATIC_CONST( SignalLength = 1 );
Uint32 gci;
--- 1.17/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp Wed Apr 27 23:32:58 2005
+++ 1.18/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp Fri May 13 12:58:12 2005
@@ -564,6 +564,13 @@
Uint32 nodeId = signal->theData[0];
c_startedNodes.set(nodeId);
c_start.m_starting.clear(nodeId);
+
+ /**
+ * Inform all interested blocks that node has started
+ */
+ for(Uint32 i = 0; i<ALL_BLOCKS_SZ; i++){
+ sendSignal(ALL_BLOCKS[i].Ref, GSN_NODE_START_REP, signal, 1, JBB);
+ }
if(!c_start.m_starting.isclear()){
jam();
--- 1.33/storage/ndb/src/kernel/blocks/suma/Suma.cpp Wed Apr 27 23:32:58 2005
+++ 1.34/storage/ndb/src/kernel/blocks/suma/Suma.cpp Fri May 13 12:58:12 2005
@@ -104,23 +104,41 @@
jamEntry();
c_nodeGroup = sd->output;
- c_noNodesInGroup = 0;
- for (int i = 0; i < MAX_NDB_NODES; i++) {
- if (sd->mask.get(i)) {
- if (i == getOwnNodeId()) c_idInNodeGroup = c_noNodesInGroup;
- c_nodesInGroup[c_noNodesInGroup] = i;
- c_noNodesInGroup++;
+ c_nodes_in_nodegroup_mask.assign(sd->mask);
+ c_noNodesInGroup = c_nodes_in_nodegroup_mask.count();
+ Uint32 i, pos= 0;
+
+ for (i = 0; i < MAX_NDB_NODES; i++) {
+ if (sd->mask.get(i))
+ {
+ c_nodesInGroup[pos++] = i;
}
}
+
+ const Uint32 replicas= c_noNodesInGroup;
+ Uint32 buckets= 1;
+ for(i = 0; i<replicas; i++)
+ buckets *= i;
+
+ for(i = 0; i<buckets; i++)
+ {
+ Bucket* ptr= c_buckets+i;
+ for(Uint32 j= 0; j< replicas; j++)
+ {
+ ptr->m_nodes[j] = c_nodesInGroup[(i + j) % replicas];
+ }
+ }
+
+ c_no_of_buckets= buckets;
// ndbout_c("c_noNodesInGroup=%d", c_noNodesInGroup);
ndbrequire(c_noNodesInGroup > 0); // at least 1 node in the nodegroup
#ifndef DBUG_OFF
for (Uint32 i = 0; i < c_noNodesInGroup; i++) {
- DBUG_PRINT("exit",("Suma: NodeGroup %u, me %u, me in group %u, "
+ DBUG_PRINT("exit",("Suma: NodeGroup %u, me %u, "
"member[%u] %u",
- c_nodeGroup, getOwnNodeId(), c_idInNodeGroup,
+ c_nodeGroup, getOwnNodeId(),
i, c_nodesInGroup[i]));
}
#endif
@@ -139,13 +157,6 @@
DBUG_PRINT("info",("startphase = %u, typeOfStart = %u",
startphase, typeOfStart));
- if(startphase == 1)
- {
- jam();
- c_restartLock = true;
- c_sendSTTORRY= false; // currently only used for sph 9
- }
-
if(startphase == 3)
{
jam();
@@ -161,23 +172,14 @@
typeOfStart == NodeState::ST_INITIAL_NODE_RESTART)
{
jam();
- for (Uint32 i = 0; i < c_noNodesInGroup; i++)
- {
- Uint32 ref = calcSumaBlockRef(c_nodesInGroup[i]);
- if (ref != reference())
- {
- DBUG_PRINT("info",("sent SUMA_START_ME to %u", refToNode(ref)));
- sendSignal(ref, GSN_SUMA_START_ME, signal,
- 1 /*SumaStartMe::SignalLength*/, JBB);
- }
- }
+
+ send_start_me_req(signal);
+ return;
}
}
if(startphase == 7)
{
- c_restartLock = false; // may be set false earlier with HANDOVER_REQ
-
if (typeOfStart != NodeState::ST_NODE_RESTART &&
typeOfStart != NodeState::ST_INITIAL_NODE_RESTART)
{
@@ -206,17 +208,9 @@
if (typeOfStart == NodeState::ST_NODE_RESTART ||
typeOfStart == NodeState::ST_INITIAL_NODE_RESTART)
{
- if (c_sendSTTORRY)
- {
- // waiting for HANDOVER_REQ completed
- sendSTTORRY(signal);
- c_sendSTTORRY= false;
- }
- else
- {
- // waiting for HANDOVER_REQ
- c_sendSTTORRY= true;
- }
+ /**
+ * Handover code here
+ */
DBUG_VOID_RETURN;
}
}
@@ -226,6 +220,42 @@
}
void
+Suma::send_start_me_req(Signal* signal)
+{
+ Uint32 nodeId= c_restart_server_node_id;
+ do {
+ nodeId = c_started_nodes.find(nodeId);
+
+ if(nodeId == getOwnNodeId())
+ continue;
+ if(nodeId == NdbNodeBitmask::NotFound)
+ {
+ nodeId = 0;
+ continue;
+ }
+ break;
+ } while(true);
+
+ c_restart_server_node_id= nodeId;
+ sendSignal(calcSumaBlockRef(nodeId),
+ GSN_SUMA_START_ME_REQ, signal, 1, JBB);
+}
+
+void
+Suma::execSUMA_START_ME_REF(Signal* signal)
+{
+ const SumaStartMeRef* ref= (SumaStartMeRef*)signal->getDataPtr();
+ ndbrequire(ref->errorCode == SumaStartMeRef::Busy);
+ send_start_me_req(signal);
+}
+
+void
+Suma::execSUMA_START_ME_CONF(Signal* signal)
+{
+ sendSTTORRY(signal);
+}
+
+void
Suma::createSequence(Signal* signal)
{
jam();
@@ -260,37 +290,33 @@
jamEntry();
ReadNodesConf * const conf = (ReadNodesConf *)signal->getDataPtr();
- c_aliveNodes.clear();
- c_preparingNodes.clear();
+ c_started_nodes.assign(NdbNodeBitmask::Size, conf->startedNodes);
+ c_starting_nodes.assign(NdbNodeBitmask::Size, conf->startingNodes);
- Uint32 count = 0;
- for(Uint32 i = 0; i < MAX_NDB_NODES; i++){
- if(NodeBitmask::get(conf->allNodes, i)){
- jam();
-
- count++;
+ c_alive_nodes.assign(c_started_nodes);
+ c_alive_nodes.bitOR(c_starting_nodes);
- NodePtr node;
- ndbrequire(c_nodes.seize(node));
-
- node.p->nodeId = i;
- if(NodeBitmask::get(conf->inactiveNodes, i)){
- jam();
- node.p->alive = 0;
- } else {
- jam();
- node.p->alive = 1;
- c_aliveNodes.set(i);
- }
- } else
- jam();
- }
c_masterNodeId = conf->masterNodeId;
- ndbrequire(count == conf->noOfNodes);
-
+
sendSTTORRY(signal);
}
+void
+Suma::execNODE_START_REP(Signal* signal)
+{
+ Uint32 nodeId = signal->theData[0];
+ if(c_nodes_in_nodegroup_mask.get(nodeId))
+ {
+ /**
+ * A handover should have happened for all nodes in my node group
+ */
+ ndbrequire(c_started_nodes.get(nodeId));
+ }
+
+ c_started_nodes.set(nodeId);
+ c_starting_nodes.clear(nodeId);
+}
+
#if 0
void
Suma::execREAD_CONFIG_REQ(Signal* signal)
@@ -348,11 +374,6 @@
jamEntry();
}
-void
-SumaParticipant::execCONTINUEB(Signal* signal)
-{
- jamEntry();
-}
/*****************************************************************************
*
@@ -378,9 +399,9 @@
}//execAPI_FAILREQ()
bool
-SumaParticipant::removeSubscribersOnNode(Signal *signal, Uint32 nodeId)
+Suma::removeSubscribersOnNode(Signal *signal, Uint32 nodeId)
{
- DBUG_ENTER("SumaParticipant::removeSubscribersOnNode");
+ DBUG_ENTER("Suma::removeSubscribersOnNode");
bool found = false;
KeyTable<Table>::Iterator it;
@@ -413,10 +434,10 @@
}
void
-SumaParticipant::sendSubStopReq(Signal *signal, bool unlock){
+Suma::sendSubStopReq(Signal *signal, bool unlock){
static bool remove_lock = false;
jam();
- DBUG_ENTER("SumaParticipant::sendSubStopReq");
+ DBUG_ENTER("Suma::sendSubStopReq");
SubscriberPtr subbPtr;
c_removeDataSubscribers.first(subbPtr);
@@ -456,18 +477,18 @@
}
void
-SumaParticipant::execSUB_STOP_CONF(Signal* signal){
+Suma::execSUB_STOP_CONF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execSUB_STOP_CONF");
+ DBUG_ENTER("Suma::execSUB_STOP_CONF");
ndbassert(signal->getNoOfSections() == 0);
sendSubStopReq(signal,true);
DBUG_VOID_RETURN;
}
void
-SumaParticipant::execSUB_STOP_REF(Signal* signal){
+Suma::execSUB_STOP_REF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execSUB_STOP_REF");
+ DBUG_ENTER("Suma::execSUB_STOP_REF");
ndbassert(signal->getNoOfSections() == 0);
SubStopRef * const ref = (SubStopRef*)signal->getDataPtr();
@@ -503,42 +524,34 @@
DBUG_ENTER("Suma::execNODE_FAILREP");
ndbassert(signal->getNoOfSections() == 0);
- NodeFailRep * const rep = (NodeFailRep*)signal->getDataPtr();
+ const NodeFailRep * rep = (NodeFailRep*)signal->getDataPtr();
+ NdbNodeBitmask failed; failed.assign(NdbNodeBitmask::Size, rep->theNodes);
bool changed = false;
- NodePtr nodePtr;
c_nodeFailGCI = getFirstGCI(signal);
-
- for(c_nodes.first(nodePtr); nodePtr.i != RNIL; c_nodes.next(nodePtr)){
- if(NodeBitmask::get(rep->theNodes, nodePtr.p->nodeId)){
- if(nodePtr.p->alive){
- ndbassert(c_aliveNodes.get(nodePtr.p->nodeId));
- changed = true;
- jam();
- } else {
- ndbassert(!c_aliveNodes.get(nodePtr.p->nodeId));
- jam();
- }
-
- if (c_preparingNodes.get(nodePtr.p->nodeId)) {
- jam();
- // we are currently preparing this node that died
- // it's ok just to clear and go back to waiting for it to start up
- Restart.resetNode(calcSumaBlockRef(nodePtr.p->nodeId));
- c_preparingNodes.clear(nodePtr.p->nodeId);
- } else if (c_handoverToDo) {
+ if(failed.get(Restart.nodeId))
+ {
+ Restart.nodeId = 0;
+ }
+
+ if(c_nodes_in_nodegroup_mask.overlaps(failed))
+ {
+ Uint32 nodeId= failed.find(0);
+ for(; nodeId != NdbNodeBitmask::NotFound; nodeId= failed.find(nodeId))
+ {
+ if (c_handoverToDo) {
jam();
// TODO what if I'm a SUMA that is currently restarting and the SUMA
// responsible for restarting me is the one that died?
-
+
// a node has failed whilst handover is going on
// let's check if we're in the process of handover with that node
c_handoverToDo = false;
for( int i = 0; i < NO_OF_BUCKETS; i++) {
if (c_buckets[i].handover) {
// I'm doing handover, but is it with the dead node?
- if (getResponsibleSumaNodeId(i) == nodePtr.p->nodeId) {
+ if (getResponsibleSumaNodeId(i) == nodeId) {
// so it was the dead node, has handover started?
if (c_buckets[i].handover_started) {
jam();
@@ -558,13 +571,14 @@
}
}
}
-
- c_failoverBuffer.nodeFailRep();
-
- nodePtr.p->alive = 0;
- c_aliveNodes.clear(nodePtr.p->nodeId); // this has to be done after the loop above
}
}
+
+ c_failoverBuffer.nodeFailRep();
+
+ c_alive_nodes.bitAND(failed); // this has to be done after the loop above
+ c_started_nodes.bitAND(failed);
+ c_starting_nodes.bitAND(failed);
DBUG_VOID_RETURN;
}
@@ -573,49 +587,12 @@
jamEntry();
//const Uint32 senderRef = signal->theData[0];
- const Uint32 inclNode = signal->theData[1];
-
- NodePtr node;
- for(c_nodes.first(node); node.i != RNIL; c_nodes.next(node)){
- jam();
- const Uint32 nodeId = node.p->nodeId;
- if(inclNode == nodeId){
- jam();
-
- ndbrequire(node.p->alive == 0);
- ndbrequire(!c_aliveNodes.get(nodeId));
-
- for (Uint32 j = 0; j < c_noNodesInGroup; j++) {
- jam();
- if (c_nodesInGroup[j] == nodeId) {
- // the starting node is part of my node group
- jam();
- c_preparingNodes.set(nodeId); // set as being prepared
- for (Uint32 i = 0; i < c_noNodesInGroup; i++) {
- jam();
- if (i == c_idInNodeGroup) {
- jam();
- // I'm responsible for restarting this SUMA
- // ALL dict's should have meta data info so it is ok to start
- Restart.startNode(signal, calcSumaBlockRef(nodeId));
- break;
- }//if
- if (c_aliveNodes.get(c_nodesInGroup[i])) {
- jam();
- break; // another Suma takes care of this
- }//if
- }//for
- break;
- }//if
- }//for
-
- node.p->alive = 1;
- c_aliveNodes.set(nodeId);
-
- break;
- }//if
- }//for
+ const Uint32 nodeId = signal->theData[1];
+ ndbrequire(!c_alive_nodes.get(nodeId));
+ c_alive_nodes.set(nodeId);
+ c_starting_nodes.set(nodeId); // set as being prepared
+
#if 0 // if we include this DIH's got to be prepared, later if needed...
signal->theData[0] = reference();
@@ -636,10 +613,10 @@
*/
static unsigned
-count_subscribers(const DLList<SumaParticipant::Subscriber> &subs)
+count_subscribers(const DLList<Suma::Subscriber> &subs)
{
unsigned n= 0;
- SumaParticipant::SubscriberPtr i_subbPtr;
+ Suma::SubscriberPtr i_subbPtr;
subs.first(i_subbPtr);
while(!i_subbPtr.isNull()){
n++;
@@ -689,8 +666,8 @@
c_subscriberPool.getNoOfFree());
infoEvent("Suma: c_tablePool size: %d free: %d",
- c_tablePool_.getSize(),
- c_tablePool_.getNoOfFree());
+ c_tablePool.getSize(),
+ c_tablePool.getNoOfFree());
infoEvent("Suma: c_subscriptionPool size: %d free: %d",
c_subscriptionPool.getSize(),
@@ -821,11 +798,11 @@
void
-SumaParticipant::sendSubIdRef(Signal* signal,
+Suma::sendSubIdRef(Signal* signal,
Uint32 senderRef, Uint32 senderData, Uint32 errCode)
{
jam();
- DBUG_ENTER("SumaParticipant::sendSubIdRef");
+ DBUG_ENTER("Suma::sendSubIdRef");
CreateSubscriptionIdRef * ref =
(CreateSubscriptionIdRef *)signal->getDataPtrSend();
@@ -849,10 +826,10 @@
*/
void
-SumaParticipant::addTableId(Uint32 tableId,
+Suma::addTableId(Uint32 tableId,
SubscriptionPtr subPtr, SyncRecord *psyncRec)
{
- DBUG_ENTER("SumaParticipant::addTableId");
+ DBUG_ENTER("Suma::addTableId");
DBUG_PRINT("enter",("tableId: %u subPtr.i: %u", tableId, subPtr.i));
subPtr.p->m_tableId= tableId;
if(psyncRec != NULL)
@@ -861,10 +838,10 @@
}
void
-SumaParticipant::execSUB_CREATE_REQ(Signal* signal)
+Suma::execSUB_CREATE_REQ(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execSUB_CREATE_REQ");
+ DBUG_ENTER("Suma::execSUB_CREATE_REQ");
ndbassert(signal->getNoOfSections() == 0);
CRASH_INSERTION(13003);
@@ -945,7 +922,7 @@
}
void
-SumaParticipant::sendSubCreateRef(Signal* signal, Uint32 errCode)
+Suma::sendSubCreateRef(Signal* signal, Uint32 errCode)
{
jam();
SubCreateRef * ref = (SubCreateRef *)signal->getDataPtrSend();
@@ -956,7 +933,7 @@
}
Uint32
-SumaParticipant::getFirstGCI(Signal* signal) {
+Suma::getFirstGCI(Signal* signal) {
if (c_lastCompleteGCI == RNIL) {
ndbout_c("WARNING: c_lastCompleteGCI == RNIL");
return 0;
@@ -971,10 +948,10 @@
*/
void
-SumaParticipant::execSUB_SYNC_REQ(Signal* signal)
+Suma::execSUB_SYNC_REQ(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execSUB_SYNC_REQ");
+ DBUG_ENTER("Suma::execSUB_SYNC_REQ");
ndbassert(signal->getNoOfSections() <= 1);
CRASH_INSERTION(13004);
@@ -1031,7 +1008,7 @@
TablePtr tabPtr;
initTable(signal,subPtr.p->m_tableId,tabPtr,syncPtr);
tabPtr.p->n_subscribers++;
- DBUG_PRINT("info",("SumaParticipant::Table[%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u]::n_subscribers: %u",
tabPtr.p->m_tableId, tabPtr.p->n_subscribers));
DBUG_VOID_RETURN;
@@ -1078,7 +1055,7 @@
}
void
-SumaParticipant::sendSubSyncRef(Signal* signal, Uint32 errCode){
+Suma::sendSubSyncRef(Signal* signal, Uint32 errCode){
jam();
SubSyncRef * ref= (SubSyncRef *)signal->getDataPtrSend();
ref->errorCode = errCode;
@@ -1097,7 +1074,7 @@
#if 0
void
-SumaParticipant::execLIST_TABLES_CONF(Signal* signal){
+Suma::execLIST_TABLES_CONF(Signal* signal){
jamEntry();
CRASH_INSERTION(13005);
ListTablesConf* const conf = (ListTablesConf*)signal->getDataPtr();
@@ -1113,7 +1090,7 @@
*/
#if 0
void
-SumaParticipant::Table::runLIST_TABLES_CONF(Signal* signal){
+Suma::Table::runLIST_TABLES_CONF(Signal* signal){
jam();
ListTablesConf * const conf = (ListTablesConf*)signal->getDataPtr();
@@ -1165,10 +1142,10 @@
int
-SumaParticipant::initTable(Signal *signal, Uint32 tableId, TablePtr &tabPtr,
+Suma::initTable(Signal *signal, Uint32 tableId, TablePtr &tabPtr,
SubscriberPtr subbPtr)
{
- DBUG_ENTER("SumaParticipant::initTable SubscriberPtr");
+ DBUG_ENTER("Suma::initTable SubscriberPtr");
DBUG_PRINT("enter",("tableId: %d", tableId));
int r= initTable(signal,tableId,tabPtr);
@@ -1199,11 +1176,11 @@
}
int
-SumaParticipant::initTable(Signal *signal, Uint32 tableId, TablePtr &tabPtr,
+Suma::initTable(Signal *signal, Uint32 tableId, TablePtr &tabPtr,
Ptr<SyncRecord> syncPtr)
{
jam();
- DBUG_ENTER("SumaParticipant::initTable Ptr<SyncRecord>");
+ DBUG_ENTER("Suma::initTable Ptr<SyncRecord>");
DBUG_PRINT("enter",("tableId: %d", tableId));
int r= initTable(signal,tableId,tabPtr);
@@ -1223,10 +1200,10 @@
}
int
-SumaParticipant::initTable(Signal *signal, Uint32 tableId, TablePtr &tabPtr)
+Suma::initTable(Signal *signal, Uint32 tableId, TablePtr &tabPtr)
{
jam();
- DBUG_ENTER("SumaParticipant::initTable");
+ DBUG_ENTER("Suma::initTable");
if (!c_tables.find(tabPtr, tableId) ||
tabPtr.p->m_state == Table::DROPPED ||
@@ -1234,16 +1211,16 @@
{
// table not being prepared
// seize a new table, initialize and add to c_tables
- ndbrequire(c_tablePool_.seize(tabPtr));
+ ndbrequire(c_tablePool.seize(tabPtr));
DBUG_PRINT("info",("c_tablePool size: %d free: %d",
- c_tablePool_.getSize(),
- c_tablePool_.getNoOfFree()));
+ c_tablePool.getSize(),
+ c_tablePool.getNoOfFree()));
new (tabPtr.p) Table;
tabPtr.p->m_tableId= tableId;
tabPtr.p->m_ptrI= tabPtr.i;
tabPtr.p->n_subscribers = 0;
- DBUG_PRINT("info",("SumaParticipant::Table[%u,i=%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u,i=%u]::n_subscribers: %u",
tabPtr.p->m_tableId, tabPtr.i, tabPtr.p->n_subscribers));
tabPtr.p->m_error = 0;
@@ -1280,10 +1257,10 @@
}
void
-SumaParticipant::completeOneSubscriber(Signal *signal, TablePtr tabPtr, SubscriberPtr subbPtr)
+Suma::completeOneSubscriber(Signal *signal, TablePtr tabPtr, SubscriberPtr subbPtr)
{
jam();
- DBUG_ENTER("SumaParticipant::completeOneSubscriber");
+ DBUG_ENTER("Suma::completeOneSubscriber");
if (tabPtr.p->m_error)
{
@@ -1306,10 +1283,10 @@
}
void
-SumaParticipant::completeAllSubscribers(Signal *signal, TablePtr tabPtr)
+Suma::completeAllSubscribers(Signal *signal, TablePtr tabPtr)
{
jam();
- DBUG_ENTER("SumaParticipant::completeAllSubscribers");
+ DBUG_ENTER("Suma::completeAllSubscribers");
// handle all subscribers
{
LocalDLList<Subscriber> subscribers(c_subscriberPool,
@@ -1326,10 +1303,10 @@
}
void
-SumaParticipant::completeInitTable(Signal *signal, TablePtr tabPtr)
+Suma::completeInitTable(Signal *signal, TablePtr tabPtr)
{
jam();
- DBUG_ENTER("SumaParticipant::completeInitTable");
+ DBUG_ENTER("Suma::completeInitTable");
// handle all syncRecords
while (!tabPtr.p->c_syncRecords.isEmpty())
@@ -1357,7 +1334,7 @@
if (tabPtr.p->m_error)
{
- DBUG_PRINT("info",("SumaParticipant::Table[%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u]::n_subscribers: %u",
tabPtr.p->m_tableId, tabPtr.p->n_subscribers));
tabPtr.p->checkRelease(*this);
}
@@ -1371,14 +1348,14 @@
void
-SumaParticipant::execGET_TABINFOREF(Signal* signal){
+Suma::execGET_TABINFOREF(Signal* signal){
jamEntry();
/* ToDo handle this */
ndbrequire(false);
}
void
-SumaParticipant::execGET_TABINFO_CONF(Signal* signal){
+Suma::execGET_TABINFO_CONF(Signal* signal){
jamEntry();
CRASH_INSERTION(13006);
@@ -1390,7 +1367,7 @@
GetTabInfoConf* conf = (GetTabInfoConf*)signal->getDataPtr();
Uint32 tableId = conf->tableId;
TablePtr tabPtr;
- c_tablePool_.getPtr(tabPtr, conf->senderData);
+ c_tablePool.getPtr(tabPtr, conf->senderData);
SegmentedSectionPtr ptr;
signal->getSection(ptr, GetTabInfoConf::DICT_TAB_INFO);
ndbrequire(tabPtr.p->parseTable(ptr, *this));
@@ -1406,10 +1383,10 @@
}
bool
-SumaParticipant::Table::parseTable(SegmentedSectionPtr ptr,
- SumaParticipant &suma)
+Suma::Table::parseTable(SegmentedSectionPtr ptr,
+ Suma &suma)
{
- DBUG_ENTER("SumaParticipant::Table::parseTable");
+ DBUG_ENTER("Suma::Table::parseTable");
SimplePropertiesSectionReader it(ptr, suma.getSectionSegmentPool());
@@ -1436,10 +1413,10 @@
// hopefully none
c_tables.release(tabPtr);
DBUG_PRINT("info",("c_tablePool size: %d free: %d",
- suma.c_tablePool_.getSize(),
- suma.c_tablePool_.getNoOfFree()));
+ suma.c_tablePool.getSize(),
+ suma.c_tablePool.getNoOfFree()));
tabPtr.setNull();
- DLHashTable<SumaParticipant::Subscription>::Iterator i_subPtr;
+ DLHashTable<Suma::Subscription>::Iterator i_subPtr;
c_subscriptions.first(i_subPtr);
SubscriptionPtr subPtr;
for(;!i_subPtr.isNull();c_subscriptions.next(i_subPtr)){
@@ -1548,10 +1525,10 @@
}
void
-SumaParticipant::execDI_FCOUNTCONF(Signal* signal)
+Suma::execDI_FCOUNTCONF(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execDI_FCOUNTCONF");
+ DBUG_ENTER("Suma::execDI_FCOUNTCONF");
ndbassert(signal->getNoOfSections() == 0);
const Uint32 userPtr = signal->theData[0];
@@ -1562,7 +1539,7 @@
TablePtr tabPtr;
tabPtr.i= signal->theData[3];
- ndbrequire(tabPtr.p= c_tablePool_.getPtr(tabPtr.i));
+ ndbrequire(tabPtr.p= c_tablePool.getPtr(tabPtr.i));
ndbrequire(tabPtr.p->m_tableId == tableId);
LocalDataBuffer<15> fragBuf(c_dataBufferPool, tabPtr.p->m_fragments);
@@ -1580,9 +1557,9 @@
}
void
-SumaParticipant::execDIGETPRIMCONF(Signal* signal){
+Suma::execDIGETPRIMCONF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execDIGETPRIMCONF");
+ DBUG_ENTER("Suma::execDIGETPRIMCONF");
ndbassert(signal->getNoOfSections() == 0);
const Uint32 userPtr = signal->theData[0];
@@ -1595,7 +1572,7 @@
TablePtr tabPtr;
tabPtr.i= signal->theData[1];
- ndbrequire(tabPtr.p= c_tablePool_.getPtr(tabPtr.i));
+ ndbrequire(tabPtr.p= c_tablePool.getPtr(tabPtr.i));
ndbrequire(tabPtr.p->m_tableId == tableId);
{
@@ -1638,7 +1615,7 @@
#if 0
void
-SumaParticipant::SyncRecord::completeTableInit(Signal* signal)
+Suma::SyncRecord::completeTableInit(Signal* signal)
{
jam();
SubscriptionPtr subPtr;
@@ -1675,10 +1652,10 @@
*/
void
-SumaParticipant::SyncRecord::startScan(Signal* signal)
+Suma::SyncRecord::startScan(Signal* signal)
{
jam();
- DBUG_ENTER("SumaParticipant::SyncRecord::startScan");
+ DBUG_ENTER("Suma::SyncRecord::startScan");
/**
* Get fraginfo
@@ -1690,7 +1667,7 @@
}
bool
-SumaParticipant::SyncRecord::getNextFragment(TablePtr * tab,
+Suma::SyncRecord::getNextFragment(TablePtr * tab,
FragmentDescriptor * fd)
{
jam();
@@ -1720,7 +1697,7 @@
m_currentFragment = 0;
tabPtr.p->n_subscribers--;
- DBUG_PRINT("info",("SumaParticipant::Table[%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u]::n_subscribers: %u",
tabPtr.p->m_tableId, tabPtr.p->n_subscribers));
tabPtr.p->checkRelease(suma);
}
@@ -1728,10 +1705,10 @@
}
void
-SumaParticipant::SyncRecord::nextScan(Signal* signal)
+Suma::SyncRecord::nextScan(Signal* signal)
{
jam();
- DBUG_ENTER("SumaParticipant::SyncRecord::nextScan");
+ DBUG_ENTER("Suma::SyncRecord::nextScan");
TablePtr tabPtr;
FragmentDescriptor fd;
SubscriptionPtr subPtr;
@@ -1803,7 +1780,7 @@
void
-SumaParticipant::execSCAN_FRAGREF(Signal* signal){
+Suma::execSCAN_FRAGREF(Signal* signal){
jamEntry();
// ScanFragRef * const ref = (ScanFragRef*)signal->getDataPtr();
@@ -1811,9 +1788,9 @@
}
void
-SumaParticipant::execSCAN_FRAGCONF(Signal* signal){
+Suma::execSCAN_FRAGCONF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execSCAN_FRAGCONF");
+ DBUG_ENTER("Suma::execSCAN_FRAGCONF");
ndbassert(signal->getNoOfSections() == 0);
CRASH_INSERTION(13011);
@@ -1853,7 +1830,7 @@
}
void
-SumaParticipant::execSUB_SYNC_CONTINUE_CONF(Signal* signal){
+Suma::execSUB_SYNC_CONTINUE_CONF(Signal* signal){
jamEntry();
ndbassert(signal->getNoOfSections() == 0);
@@ -1881,10 +1858,10 @@
}
void
-SumaParticipant::SyncRecord::completeScan(Signal* signal, int error)
+Suma::SyncRecord::completeScan(Signal* signal, int error)
{
jam();
- DBUG_ENTER("SumaParticipant::SyncRecord::completeScan");
+ DBUG_ENTER("Suma::SyncRecord::completeScan");
// m_tableList.release();
#if PRINT_ONLY
@@ -1917,7 +1894,7 @@
}
void
-SumaParticipant::execSCAN_HBREP(Signal* signal){
+Suma::execSCAN_HBREP(Signal* signal){
jamEntry();
#if 0
ndbout << "execSCAN_HBREP" << endl << hex;
@@ -1939,36 +1916,35 @@
*/
void
-SumaParticipant::execSUB_START_REQ(Signal* signal){
+Suma::execSUB_START_REQ(Signal* signal){
jamEntry();
ndbassert(signal->getNoOfSections() == 0);
- DBUG_ENTER("SumaParticipant::execSUB_START_REQ");
-
- CRASH_INSERTION(13013);
-
- if (c_restartLock) {
- jam();
- // ndbout_c("c_restartLock");
- if (RtoI(signal->getSendersBlockRef(), false) == RNIL) {
- jam();
- sendSubStartRef(signal, 1405);
- DBUG_VOID_RETURN;
- }
- // only allow other Suma's in the nodegroup to come through for restart purposes
- }
-
- Subscription key;
-
+ DBUG_ENTER("Suma::execSUB_START_REQ");
SubStartReq * const req = (SubStartReq*)signal->getDataPtr();
+ CRASH_INSERTION(13013);
Uint32 senderRef = req->senderRef;
Uint32 senderData = req->senderData;
Uint32 subscriberData = req->subscriberData;
Uint32 subscriberRef = req->subscriberRef;
SubscriptionData::Part part = (SubscriptionData::Part)req->part;
+
+ Subscription key;
key.m_subscriptionId = req->subscriptionId;
key.m_subscriptionKey = req->subscriptionKey;
-
+
+ if (c_restart_server_node_id &&
+ refToNode(senderRef) != c_restart_server_node_id)
+ {
+ /**
+ * only allow "restart_server" Suma's to come through
+ * for restart purposes
+ */
+ jam();
+ sendSubStartRef(signal, 1405);
+ DBUG_VOID_RETURN;
+ }
+
SubscriptionPtr subPtr;
if(!c_subscriptions.find(subPtr, key)){
jam();
@@ -2027,7 +2003,7 @@
jam();
initTable(signal,subPtr.p->m_tableId,tabPtr,subbPtr);
tabPtr.p->n_subscribers++;
- DBUG_PRINT("info",("SumaParticipant::Table[%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u]::n_subscribers: %u",
tabPtr.p->m_tableId, tabPtr.p->n_subscribers));
DBUG_VOID_RETURN;
}
@@ -2035,13 +2011,13 @@
}
void
-SumaParticipant::sendSubStartComplete(Signal* signal,
+Suma::sendSubStartComplete(Signal* signal,
SubscriberPtr subbPtr,
Uint32 firstGCI,
SubscriptionData::Part part)
{
jam();
- DBUG_ENTER("SumaParticipant::sendSubStartComplete");
+ DBUG_ENTER("Suma::sendSubStartComplete");
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subbPtr.p->m_subPtrI);
@@ -2073,7 +2049,7 @@
}
void
-SumaParticipant::sendSubStartRef(Signal* signal, Uint32 errCode)
+Suma::sendSubStartRef(Signal* signal, Uint32 errCode)
{
jam();
SubStartRef * ref = (SubStartRef *)signal->getDataPtrSend();
@@ -2084,7 +2060,7 @@
SubStartRef::SignalLength, JBB);
}
void
-SumaParticipant::sendSubStartRef(Signal* signal,
+Suma::sendSubStartRef(Signal* signal,
SubscriberPtr subbPtr, Uint32 error,
SubscriptionData::Part part)
{
@@ -2116,10 +2092,10 @@
*/
void
-SumaParticipant::execSUB_STOP_REQ(Signal* signal){
+Suma::execSUB_STOP_REQ(Signal* signal){
jamEntry();
ndbassert(signal->getNoOfSections() == 0);
- DBUG_ENTER("SumaParticipant::execSUB_STOP_REQ");
+ DBUG_ENTER("Suma::execSUB_STOP_REQ");
CRASH_INSERTION(13019);
@@ -2246,7 +2222,7 @@
{
jam();
tabPtr.p->n_subscribers--;
- DBUG_PRINT("info",("SumaParticipant::Table[%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u]::n_subscribers: %u",
tabPtr.p->m_tableId, tabPtr.p->n_subscribers));
tabPtr.p->checkRelease(*this);
sendSubStopComplete(signal, tabPtr.p->m_drop_subbPtr);
@@ -2260,10 +2236,10 @@
}
void
-SumaParticipant::sendSubStopComplete(Signal* signal, SubscriberPtr subbPtr)
+Suma::sendSubStopComplete(Signal* signal, SubscriberPtr subbPtr)
{
jam();
- DBUG_ENTER("SumaParticipant::sendSubStopComplete");
+ DBUG_ENTER("Suma::sendSubStopComplete");
CRASH_INSERTION(13020);
DBUG_PRINT("info",("removed subscriber: %i", subbPtr.i));
@@ -2286,7 +2262,7 @@
#else
TablePtr tabPtr;
tabPtr.i = subPtr.p->m_table_ptrI;
- if ((tabPtr.p= c_tablePool_.getPtr(tabPtr.i)) &&
+ if ((tabPtr.p= c_tablePool.getPtr(tabPtr.i)) &&
(tabPtr.p->m_state == Table::DROPPED ||
tabPtr.p->m_state == Table::ALTERED) &&
false)
@@ -2331,10 +2307,10 @@
}
void
-SumaParticipant::sendSubStopRef(Signal* signal, Uint32 errCode)
+Suma::sendSubStopRef(Signal* signal, Uint32 errCode)
{
jam();
- DBUG_ENTER("SumaParticipant::sendSubStopRef");
+ DBUG_ENTER("Suma::sendSubStopRef");
SubStopRef * ref = (SubStopRef *)signal->getDataPtrSend();
ref->senderRef = reference();
ref->errorCode = errCode;
@@ -2353,11 +2329,11 @@
*/
int
-SumaParticipant::Table::setupTrigger(Signal* signal,
- SumaParticipant &suma)
+Suma::Table::setupTrigger(Signal* signal,
+ Suma &suma)
{
jam();
- DBUG_ENTER("SumaParticipant::Table::setupTrigger");
+ DBUG_ENTER("Suma::Table::setupTrigger");
int ret= 0;
@@ -2398,8 +2374,8 @@
}
void
-SumaParticipant::Table::createAttributeMask(AttributeMask& mask,
- SumaParticipant &suma)
+Suma::Table::createAttributeMask(AttributeMask& mask,
+ Suma &suma)
{
jam();
mask.clear();
@@ -2411,9 +2387,9 @@
}
void
-SumaParticipant::execCREATE_TRIG_CONF(Signal* signal){
+Suma::execCREATE_TRIG_CONF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execCREATE_TRIG_CONF");
+ DBUG_ENTER("Suma::execCREATE_TRIG_CONF");
ndbassert(signal->getNoOfSections() == 0);
CreateTrigConf * const conf = (CreateTrigConf*)signal->getDataPtr();
const Uint32 triggerId = conf->getTriggerId();
@@ -2444,9 +2420,9 @@
}
void
-SumaParticipant::execCREATE_TRIG_REF(Signal* signal){
+Suma::execCREATE_TRIG_REF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execCREATE_TRIG_REF");
+ DBUG_ENTER("Suma::execCREATE_TRIG_REF");
ndbassert(signal->getNoOfSections() == 0);
CreateTrigRef * const ref = (CreateTrigRef*)signal->getDataPtr();
const Uint32 triggerId = ref->getTriggerId();
@@ -2476,10 +2452,10 @@
}
void
-SumaParticipant::Table::dropTrigger(Signal* signal,SumaParticipant& suma)
+Suma::Table::dropTrigger(Signal* signal,Suma& suma)
{
jam();
- DBUG_ENTER("SumaParticipant::dropTrigger");
+ DBUG_ENTER("Suma::dropTrigger");
for(Uint32 j = 0; j<3; j++){
jam();
@@ -2517,9 +2493,9 @@
}
void
-SumaParticipant::execDROP_TRIG_REF(Signal* signal){
+Suma::execDROP_TRIG_REF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execDROP_TRIG_REF");
+ DBUG_ENTER("Suma::execDROP_TRIG_REF");
ndbassert(signal->getNoOfSections() == 0);
DropTrigRef * const ref = (DropTrigRef*)signal->getDataPtr();
if (ref->getErrorCode() != DropTrigRef::TriggerNotFound)
@@ -2535,9 +2511,9 @@
}
void
-SumaParticipant::execDROP_TRIG_CONF(Signal* signal){
+Suma::execDROP_TRIG_CONF(Signal* signal){
jamEntry();
- DBUG_ENTER("SumaParticipant::execDROP_TRIG_CONF");
+ DBUG_ENTER("Suma::execDROP_TRIG_CONF");
ndbassert(signal->getNoOfSections() == 0);
DropTrigConf * const conf = (DropTrigConf*)signal->getDataPtr();
@@ -2550,9 +2526,9 @@
}
void
-SumaParticipant::Table::runDropTrigger(Signal* signal,
+Suma::Table::runDropTrigger(Signal* signal,
Uint32 triggerId,
- SumaParticipant &suma)
+ Suma &suma)
{
jam();
Uint32 type = (triggerId >> 16) & 0x3;
@@ -2579,20 +2555,20 @@
n_subscribers--;
- DBUG_PRINT("info",("SumaParticipant::Table[%u]::n_subscribers: %u",
+ DBUG_PRINT("info",("Suma::Table[%u]::n_subscribers: %u",
m_tableId, n_subscribers));
checkRelease(suma);
suma.sendSubStopComplete(signal, m_drop_subbPtr);
}
-void SumaParticipant::suma_ndbrequire(bool v) { ndbrequire(v); }
+void Suma::suma_ndbrequire(bool v) { ndbrequire(v); }
void
-SumaParticipant::Table::checkRelease(SumaParticipant &suma)
+Suma::Table::checkRelease(Suma &suma)
{
jam();
- DBUG_ENTER("SumaParticipant::Table::checkRelease");
+ DBUG_ENTER("Suma::Table::checkRelease");
if (n_subscribers == 0)
{
jam();
@@ -2627,10 +2603,10 @@
}
release(suma);
suma.c_tables.remove(m_ptrI);
- suma.c_tablePool_.release(m_ptrI);
+ suma.c_tablePool.release(m_ptrI);
DBUG_PRINT("info",("c_tablePool size: %d free: %d",
- suma.c_tablePool_.getSize(),
- suma.c_tablePool_.getNoOfFree()));
+ suma.c_tablePool.getSize(),
+ suma.c_tablePool.getNoOfFree()));
}
else
{
@@ -2657,10 +2633,10 @@
static Uint32 b_trigBufferSize = 0;
void
-SumaParticipant::execTRANSID_AI(Signal* signal)
+Suma::execTRANSID_AI(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execTRANSID_AI");
+ DBUG_ENTER("Suma::execTRANSID_AI");
CRASH_INSERTION(13015);
TransIdAI * const data = (TransIdAI*)signal->getDataPtr();
@@ -2743,10 +2719,10 @@
*/
void
-SumaParticipant::execTRIG_ATTRINFO(Signal* signal)
+Suma::execTRIG_ATTRINFO(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execTRIG_ATTRINFO");
+ DBUG_ENTER("Suma::execTRIG_ATTRINFO");
CRASH_INSERTION(13016);
TrigAttrInfo* const trg = (TrigAttrInfo*)signal->getDataPtr();
@@ -2759,8 +2735,6 @@
ndbrequire(b_bufferLock == trigId);
- memcpy(b_buffer + b_trigBufferSize, trg->getData(), 4 * dataLen);
- b_trigBufferSize += dataLen;
// printf("before values %u %u %u\n",trigId, dataLen, b_trigBufferSize);
} else {
jam();
@@ -2773,10 +2747,11 @@
} else {
ndbrequire(f_bufferLock == trigId);
}
-
- memcpy(f_buffer + f_trigBufferSize, trg->getData(), 4 * dataLen);
- f_trigBufferSize += dataLen;
}
+
+ memcpy(b_buffer + b_trigBufferSize, trg->getData(), 4 * dataLen);
+ b_trigBufferSize += dataLen;
+
DBUG_VOID_RETURN;
}
@@ -2796,44 +2771,37 @@
}
Uint32
-Suma::getResponsibleSumaNodeId(Uint32 D)
+Suma::getResponsibleSumaNodeId(Uint32 bucket)
{
// id will contain id to responsible suma or
// RNIL if we don't have nodegroup info yet
- Uint32 id;
-
- if (c_restartLock) {
- jam();
- // ndbout_c("c_restartLock");
- id = RNIL;
- } else {
- jam();
- id = RNIL;
- const Uint32 n = c_noNodesInGroup; // Number nodes in node group
- const Uint32 C1 = D / n;
- const Uint32 C2 = D - C1*n; // = D % n;
- const Uint32 C = C2 + C1 % n;
- for (Uint32 i = 0; i < n; i++) {
- jam();
- id = c_nodesInGroup[(C + i) % n];
- if (c_aliveNodes.get(id) &&
- !c_preparingNodes.get(id)) {
- jam();
- break;
- }//if
+ jam();
+ Uint32 node;
+ Bucket* ptr= c_buckets + bucket;
+ for(Uint32 i = 0; i<MAX_REPLICAS; i++)
+ {
+ node= ptr->m_nodes[i];
+ if(c_started_nodes.get(node))
+ {
+ break;
}
+ }
+
+
#ifdef NODEFAIL_DEBUG2
- theCounts[id]++;
+ if(node != 0)
+ {
+ theCounts[node]++;
ndbout_c("Suma:responsible n=%u, D=%u, id = %u, count=%u",
- n,D, id, theCounts[id]);
-#endif
+ n,D, id, theCounts[node]);
}
- return id;
+#endif
+ return node;
}
Uint32
-SumaParticipant::decideWhoToSend(Uint32 nBucket, Uint32 gci){
+Suma::decideWhoToSend(Uint32 nBucket, Uint32 gci){
bool replicaFlag = true;
Uint32 nId = RNIL;
@@ -2886,10 +2854,10 @@
}
void
-SumaParticipant::execFIRE_TRIG_ORD(Signal* signal)
+Suma::execFIRE_TRIG_ORD(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execFIRE_TRIG_ORD");
+ DBUG_ENTER("Suma::execFIRE_TRIG_ORD");
ndbassert(signal->getNoOfSections() == 0);
CRASH_INSERTION(13016);
@@ -2966,7 +2934,7 @@
/**
* Signal to subscriber(s)
*/
- ndbrequire(tabPtr.p = c_tablePool_.getPtr(tabPtr.i));
+ ndbrequire(tabPtr.p = c_tablePool.getPtr(tabPtr.i));
SubTableData * data = (SubTableData*)signal->getDataPtrSend();//trg;
data->gci = gci;
@@ -3006,7 +2974,7 @@
}
void
-SumaParticipant::execSUB_GCP_COMPLETE_REP(Signal* signal)
+Suma::execSUB_GCP_COMPLETE_REP(Signal* signal)
{
jamEntry();
ndbassert(signal->getNoOfSections() == 0);
@@ -3086,10 +3054,10 @@
}
void
-SumaParticipant::execCREATE_TAB_CONF(Signal *signal)
+Suma::execCREATE_TAB_CONF(Signal *signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execCREATE_TAB_CONF");
+ DBUG_ENTER("Suma::execCREATE_TAB_CONF");
CreateTabConf * const conf = (CreateTabConf*)signal->getDataPtr();
Uint32 tableId = conf->senderData;
@@ -3101,10 +3069,10 @@
}
void
-SumaParticipant::execDROP_TAB_CONF(Signal *signal)
+Suma::execDROP_TAB_CONF(Signal *signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execDROP_TAB_CONF");
+ DBUG_ENTER("Suma::execDROP_TAB_CONF");
ndbassert(signal->getNoOfSections() == 0);
DropTabConf * const conf = (DropTabConf*)signal->getDataPtr();
@@ -3169,10 +3137,10 @@
}
void
-SumaParticipant::execALTER_TAB_CONF(Signal *signal)
+Suma::execALTER_TAB_CONF(Signal *signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execALTER_TAB_CONF");
+ DBUG_ENTER("Suma::execALTER_TAB_CONF");
ndbassert(signal->getNoOfSections() == 0);
AlterTabConf * const conf = (AlterTabConf*)signal->getDataPtr();
@@ -3239,7 +3207,7 @@
*/
void
-SumaParticipant::runSUB_GCP_COMPLETE_ACK(Signal* signal)
+Suma::runSUB_GCP_COMPLETE_ACK(Signal* signal)
{
jam();
@@ -3248,7 +3216,7 @@
Uint32 gci = ack->rep.gci;
#ifdef EVENT_DEBUG
- ndbout_c("SumaParticipant::runSUB_GCP_COMPLETE_ACK gci = %u", gci);
+ ndbout_c("Suma::runSUB_GCP_COMPLETE_ACK gci = %u", gci);
#endif
c_failoverBuffer.subGcpCompleteRep(gci);
@@ -3260,7 +3228,12 @@
jamEntry();
ndbassert(signal->getNoOfSections() == 0);
- if (RtoI(signal->getSendersBlockRef(), false) != RNIL) {
+ SubGcpCompleteAck * const ack = (SubGcpCompleteAck*)signal->getDataPtr();
+ Uint32 gci = ack->rep.gci;
+ Uint32 senderRef = ack->rep.senderRef;
+ Uint32 senderData = ack->rep.senderData;
+
+ if (refToBlock(senderRef) == SUMA) {
jam();
// Ack from other SUMA
runSUB_GCP_COMPLETE_ACK(signal);
@@ -3269,11 +3242,6 @@
jam();
// Ack from User and not an ack from other SUMA, redistribute in nodegroup
-
- SubGcpCompleteAck * const ack = (SubGcpCompleteAck*)signal->getDataPtr();
- Uint32 gci = ack->rep.gci;
- Uint32 senderRef = ack->rep.senderRef;
- Uint32 senderData = ack->rep.senderData;
static Uint32 last_gci= 0;
if (last_gci < gci)
@@ -3282,29 +3250,25 @@
// tell the other SUMA's that I'm done with this GCI
jam();
- for (Uint32 i = 0; i < c_noNodesInGroup; i++) {
- Uint32 id = c_nodesInGroup[i];
- Uint32 ref = calcSumaBlockRef(id);
- if ((ref != reference()) && c_aliveNodes.get(id)) {
- jam();
- sendSignal(ref, GSN_SUB_GCP_COMPLETE_ACK, signal,
- SubGcpCompleteAck::SignalLength, JBB);
- } else
- jam();
- }
+ NdbNodeBitmask tmp= c_alive_nodes;
+ tmp.bitAND(c_nodes_in_nodegroup_mask);
+ tmp.clear(getOwnNodeId());
+ NodeReceiverGroup rg(SUMA, tmp);
+ sendSignal(rg, GSN_SUB_GCP_COMPLETE_ACK, signal,
+ SubGcpCompleteAck::SignalLength, JBB);
}
}
static Uint32 tmpFailoverBuffer[512];
-//SumaParticipant::FailoverBuffer::FailoverBuffer(DataBuffer<15>::DataBufferPool & p)
+//Suma::FailoverBuffer::FailoverBuffer(DataBuffer<15>::DataBufferPool & p)
// : m_dataList(p),
-SumaParticipant::FailoverBuffer::FailoverBuffer()
+Suma::FailoverBuffer::FailoverBuffer()
:
c_gcis(tmpFailoverBuffer), c_sz(512), c_first(0), c_next(0), c_full(false)
{
}
-bool SumaParticipant::FailoverBuffer::subTableData(Uint32 gci, Uint32 *src, int sz)
+bool Suma::FailoverBuffer::subTableData(Uint32 gci, Uint32 *src, int sz)
{
bool ok = true;
@@ -3323,7 +3287,7 @@
}
return ok;
}
-bool SumaParticipant::FailoverBuffer::subGcpCompleteRep(Uint32 gci)
+bool Suma::FailoverBuffer::subGcpCompleteRep(Uint32 gci)
{
bool ok = true;
@@ -3341,7 +3305,7 @@
return ok;
}
-bool SumaParticipant::FailoverBuffer::nodeFailRep()
+bool Suma::FailoverBuffer::nodeFailRep()
{
bool ok = true;
while (true) {
@@ -3365,10 +3329,10 @@
*/
void
-SumaParticipant::execSUB_REMOVE_REQ(Signal* signal)
+Suma::execSUB_REMOVE_REQ(Signal* signal)
{
jamEntry();
- DBUG_ENTER("SumaParticipant::execSUB_REMOVE_REQ");
+ DBUG_ENTER("Suma::execSUB_REMOVE_REQ");
ndbassert(signal->getNoOfSections() == 0);
CRASH_INSERTION(13021);
@@ -3430,9 +3394,9 @@
}
void
-SumaParticipant::completeSubRemove(SubscriptionPtr subPtr)
+Suma::completeSubRemove(SubscriptionPtr subPtr)
{
- DBUG_ENTER("SumaParticipant::completeSubRemove");
+ DBUG_ENTER("Suma::completeSubRemove");
Uint32 subscriptionId = subPtr.p->m_subscriptionId;
Uint32 subscriptionKey = subPtr.p->m_subscriptionKey;
@@ -3477,10 +3441,10 @@
TablePtr tabPtr = it.curr;
c_tables.next(it);
c_tables.remove(tabPtr);
- c_tablePool_.release(tabPtr);
+ c_tablePool.release(tabPtr);
DBUG_PRINT("info",("c_tablePool size: %d free: %d",
- c_tablePool_.getSize(),
- c_tablePool_.getNoOfFree()));
+ c_tablePool.getSize(),
+ c_tablePool.getNoOfFree()));
count++;
}
DBUG_ASSERT(count == 0);
@@ -3489,11 +3453,11 @@
}
void
-SumaParticipant::sendSubRemoveRef(Signal* signal, const SubRemoveReq& req,
+Suma::sendSubRemoveRef(Signal* signal, const SubRemoveReq& req,
Uint32 errCode)
{
jam();
- DBUG_ENTER("SumaParticipant::sendSubRemoveRef");
+ DBUG_ENTER("Suma::sendSubRemoveRef");
SubRemoveRef * ref = (SubRemoveRef *)signal->getDataPtrSend();
ref->senderRef = reference();
ref->senderData = req.senderData;
@@ -3507,7 +3471,7 @@
}
void
-SumaParticipant::Table::release(SumaParticipant & suma){
+Suma::Table::release(Suma & suma){
jam();
LocalDataBuffer<15> attrBuf(suma.c_dataBufferPool, m_attributes);
@@ -3524,7 +3488,7 @@
}
void
-SumaParticipant::SyncRecord::release(){
+Suma::SyncRecord::release(){
jam();
m_tableList.release();
@@ -3544,11 +3508,11 @@
*/
void
-Suma::execSUMA_START_ME(Signal* signal) {
+Suma::execSUMA_START_ME_REQ(Signal* signal) {
jamEntry();
DBUG_ENTER("Suma::execSUMA_START_ME");
ndbassert(signal->getNoOfSections() == 0);
- Restart.runSUMA_START_ME(signal, signal->getSendersBlockRef());
+ Restart.runSUMA_START_ME_REQ(signal, signal->getSendersBlockRef());
DBUG_VOID_RETURN;
}
@@ -3592,41 +3556,27 @@
Suma::Restart::Restart(Suma& s) : suma(s)
{
- for (int i = 0; i < MAX_REPLICAS; i++)
- {
- c_okToStart[i] = false;
- c_waitingToStart[i] = false;
- }
+ nodeId = 0;
}
void
-Suma::Restart::runSUMA_START_ME(Signal* signal, Uint32 sumaRef)
+Suma::Restart::runSUMA_START_ME_REQ(Signal* signal, Uint32 sumaRef)
{
jam();
DBUG_ENTER("Suma::Restart::runSUMA_START_ME");
- int I = suma.RtoI(sumaRef);
-
- // restarting Suma is ready for SUB_START_REQ
- if (c_waitingToStart[I]) {
- // we've waited with startSubscriber since restarting suma was not ready
- c_waitingToStart[I] = false;
- startSubscriber(signal, sumaRef);
- } else {
- // do startSubscriber as soon as its time
- c_okToStart[I] = true;
+ if(nodeId != 0)
+ {
+ SumaStartMeRef* ref= (SumaStartMeRef*)signal->getDataPtrSend();
+ ref->errorCode = SumaStartMeRef::Busy;
+ suma.sendSignal(sumaRef, GSN_SUMA_START_ME_REF, signal,
+ SumaStartMeRef::SignalLength, JBB);
+ return;
}
- DBUG_VOID_RETURN;
-}
-void
-Suma::Restart::resetNode(Uint32 sumaRef)
-{
- jam();
- DBUG_ENTER("Suma::Restart::resetNode");
- int I = suma.RtoI(sumaRef);
- c_okToStart[I] = false;
- c_waitingToStart[I] = false;
+ nodeId = refToNode(sumaRef);
+ startNode(signal, sumaRef);
+
DBUG_VOID_RETURN;
}
@@ -3635,11 +3585,10 @@
{
jam();
DBUG_ENTER("Suma::Restart::startNode");
- resetNode(sumaRef);
-
+
// right now we can only handle restarting one node
// at a time in a node group
-
+
createSubscription(signal, sumaRef);
DBUG_VOID_RETURN;
}
@@ -3750,17 +3699,7 @@
{
jam();
DBUG_ENTER("Suma::Restart::completeSubscription");
- int I = suma.RtoI(sumaRef);
-
- if (c_okToStart[I])
- {// otherwise will start when START_ME comes
- c_okToStart[I] = false;
- startSubscriber(signal, sumaRef);
- }
- else
- {
- c_waitingToStart[I] = true;
- }
+ startSubscriber(signal, sumaRef);
DBUG_VOID_RETURN;
}
@@ -3903,12 +3842,10 @@
{
jam();
DBUG_ENTER("Suma::Restart::completeRestartingNode");
- SumaHandoverReq * req = (SumaHandoverReq *)signal->getDataPtrSend();
-
- req->gci = suma.getFirstGCI(signal);
-
- suma.sendSignal(sumaRef, GSN_SUMA_HANDOVER_REQ, signal,
- SumaHandoverReq::SignalLength, JBB);
+ SumaStartMeConf *conf= (SumaStartMeConf*)signal->getDataPtrSend();
+ suma.sendSignal(sumaRef, GSN_SUMA_START_ME_CONF, signal,
+ SumaStartMeConf::SignalLength, JBB);
+ nodeId = 0;
DBUG_VOID_RETURN;
}
@@ -3951,7 +3888,7 @@
#endif
c_handoverToDo = false;
- c_restartLock = false;
+ c_restart_server_node_id = 0;
{
#ifdef HANDOVER_DEBUG
int c = 0;
@@ -3984,20 +3921,19 @@
SumaHandoverConf::SignalLength, JBB);
}//if
}
- if (c_sendSTTORRY)
- {
- sendSTTORRY(signal);
- c_sendSTTORRY= false;
- }
- else
- {
- c_sendSTTORRY= true;
- }
+
+ sendSTTORRY(signal);
DBUG_VOID_RETURN;
}
// only run on all but restarting suma
void
+Suma::execSUMA_HANDOVER_REF(Signal* signal)
+{
+ ndbrequire(false);
+}
+
+void
Suma::execSUMA_HANDOVER_CONF(Signal* signal) {
jamEntry();
DBUG_ENTER("Suma::execSUMA_HANDOVER_CONF");
@@ -4016,7 +3952,7 @@
*/
// restarting node is now prepared and ready
- c_preparingNodes.clear(refToNode(sumaRef)); /* !! important to do before
+ c_started_nodes.set(refToNode(sumaRef)); /* !! important to do before
* below since it affects
* getResponsibleSumaNodeId()
*/
--- 1.13/storage/ndb/src/kernel/blocks/suma/Suma.hpp Wed Apr 27 23:32:59 2005
+++ 1.14/storage/ndb/src/kernel/blocks/suma/Suma.hpp Fri May 13 12:58:12 2005
@@ -33,13 +33,12 @@
#include <signaldata/UtilSequence.hpp>
#include <signaldata/SumaImpl.hpp>
-class SumaParticipant : public SimulatedBlock {
-protected:
- SumaParticipant(const Configuration & conf);
- virtual ~SumaParticipant();
- BLOCK_DEFINES(SumaParticipant);
-
-protected:
+class Suma : public SimulatedBlock {
+ BLOCK_DEFINES(Suma);
+public:
+ Suma(const Configuration & conf);
+ virtual ~Suma();
+
/**
* Private interface
*/
@@ -154,7 +153,7 @@
typedef Ptr<Table> TablePtr;
struct SyncRecord {
- SyncRecord(SumaParticipant& s, DataBuffer<15>::DataBufferPool & p)
+ SyncRecord(Suma& s, DataBuffer<15>::DataBufferPool & p)
: m_tableList(p), suma(s)
#ifdef ERROR_INSERT
, cerrorInsert(s.cerrorInsert)
@@ -187,7 +186,7 @@
bool getNextFragment(TablePtr * tab, FragmentDescriptor * fd);
void completeScan(Signal*, int error= 0);
- SumaParticipant & suma;
+ Suma & suma;
#ifdef ERROR_INSERT
UintR &cerrorInsert;
#endif
@@ -212,8 +211,8 @@
struct Table {
Table() { m_tableId = ~0; n_subscribers = 0; }
- void release(SumaParticipant&);
- void checkRelease(SumaParticipant &suma);
+ void release(Suma&);
+ void checkRelease(Suma &suma);
DLList<Subscriber>::Head c_subscribers;
DLList<SyncRecord>::Head c_syncRecords;
@@ -232,19 +231,19 @@
Uint32 n_subscribers;
- bool parseTable(SegmentedSectionPtr ptr, SumaParticipant &suma);
+ bool parseTable(SegmentedSectionPtr ptr, Suma &suma);
/**
* Create triggers
*/
- int setupTrigger(Signal* signal, SumaParticipant &suma);
+ int setupTrigger(Signal* signal, Suma &suma);
void completeTrigger(Signal* signal);
- void createAttributeMask(AttributeMask&, SumaParticipant &suma);
+ void createAttributeMask(AttributeMask&, Suma &suma);
/**
* Drop triggers
*/
- void dropTrigger(Signal* signal,SumaParticipant&);
- void runDropTrigger(Signal* signal, Uint32 triggerId,SumaParticipant&);
+ void dropTrigger(Signal* signal,Suma&);
+ void runDropTrigger(Signal* signal, Uint32 triggerId,Suma&);
/**
* Sync meta
@@ -326,10 +325,13 @@
bool active;
bool handover;
bool handover_started;
+ Uint32 m_nodes[MAX_REPLICAS];
Uint32 handoverGCI;
};
-#define NO_OF_BUCKETS 24
+ STATIC_CONST( NO_OF_BUCKETS = 24 ); // 24 = 4!
struct Bucket c_buckets[NO_OF_BUCKETS];
+ Uint32 c_no_of_buckets;
+
bool c_handoverToDo;
Uint32 c_lastCompleteGCI;
@@ -349,7 +351,7 @@
* Pools
*/
ArrayPool<Subscriber> c_subscriberPool;
- ArrayPool<Table> c_tablePool_;
+ ArrayPool<Table> c_tablePool;
ArrayPool<Subscription> c_subscriptionPool;
ArrayPool<SyncRecord> c_syncPool;
DataBuffer<15>::DataBufferPool c_dataBufferPool;
@@ -357,8 +359,7 @@
/**
* for restarting Suma not to start sending data too early
*/
- bool c_restartLock;
- bool c_sendSTTORRY;
+ Uint32 c_restart_server_node_id;
/**
* for flagging that a GCI containg inconsistent data
@@ -398,10 +399,6 @@
Uint32 getFirstGCI(Signal* signal);
Uint32 decideWhoToSend(Uint32 nBucket, Uint32 gci);
- virtual Uint32 getStoreBucket(Uint32 v) = 0;
- virtual Uint32 getResponsibleSumaNodeId(Uint32 D) = 0;
- virtual Uint32 RtoI(Uint32 sumaRef, bool dieOnNotFound = true) = 0;
-
struct FailoverBuffer {
// FailoverBuffer(DataBuffer<15>::DataBufferPool & p);
FailoverBuffer();
@@ -430,15 +427,6 @@
*/
void convertNameToId( SubscriptionPtr subPtr, Signal * signal);
-
-};
-
-class Suma : public SumaParticipant {
- BLOCK_DEFINES(Suma);
-public:
- Suma(const Configuration & conf);
- virtual ~Suma();
-private:
/**
* Public interface
*/
@@ -456,6 +444,7 @@
*/
void getNodeGroupMembers(Signal* signal);
+ void send_start_me_req(Signal* signal);
void execSTTOR(Signal* signal);
void sendSTTORRY(Signal*);
@@ -464,7 +453,7 @@
void execREAD_NODESCONF(Signal* signal);
void execNODE_FAILREP(Signal* signal);
void execINCL_NODEREQ(Signal* signal);
- void execCONTINUEB(Signal* signal);
+ void execNODE_START_REP(Signal* signal);
void execSIGNAL_DROPPED_REP(Signal* signal);
void execAPI_FAILREQ(Signal* signal) ;
@@ -482,14 +471,14 @@
void execSUB_START_REF(Signal* signal);
void execSUB_START_CONF(Signal* signal);
- void execSUB_STOP_REF(Signal* signal);
- void execSUB_STOP_CONF(Signal* signal);
-
void execSUB_ABORT_SYNC_REF(Signal* signal);
void execSUB_ABORT_SYNC_CONF(Signal* signal);
- void execSUMA_START_ME(Signal* signal);
+ void execSUMA_START_ME_REQ(Signal* signal);
+ void execSUMA_START_ME_REF(Signal* signal);
+ void execSUMA_START_ME_CONF(Signal* signal);
void execSUMA_HANDOVER_REQ(Signal* signal);
+ void execSUMA_HANDOVER_REF(Signal* signal);
void execSUMA_HANDOVER_CONF(Signal* signal);
/**
@@ -514,11 +503,9 @@
Restart(Suma& s);
Suma & suma;
+ Uint32 nodeId;
- bool c_okToStart[MAX_REPLICAS];
- bool c_waitingToStart[MAX_REPLICAS];
-
- DLHashTable<SumaParticipant::Subscription>::Iterator c_subIt;
+ DLHashTable<Subscription>::Iterator c_subIt;
KeyTable<Table>::Iterator c_tabIt;
void progError(int line, int cause, const char * extra) {
@@ -526,7 +513,7 @@
}
void resetNode(Uint32 sumaRef);
- void runSUMA_START_ME(Signal*, Uint32 sumaRef);
+ void runSUMA_START_ME_REQ(Signal*, Uint32 sumaRef);
void startNode(Signal*, Uint32 sumaRef);
void createSubscription(Signal* signal, Uint32 sumaRef);
@@ -546,65 +533,21 @@
private:
friend class Restart;
- struct SubCoordinator {
- Uint32 m_subscriberRef;
- Uint32 m_subscriberData;
-
- Uint32 m_subscriptionId;
- Uint32 m_subscriptionKey;
-
- NdbNodeBitmask m_participants;
-
- Uint32 m_outstandingGsn;
- SignalCounter m_outstandingRequests;
-
- Uint32 nextList;
- union { Uint32 prevList; Uint32 nextPool; };
- };
- Ptr<SubCoordinator> SubCoordinatorPtr;
-
- struct Node {
- Uint32 nodeId;
- Uint32 alive;
- Uint32 nextList;
- union { Uint32 prevList; Uint32 nextPool; };
- };
- typedef Ptr<Node> NodePtr;
-
/**
* Variables
*/
NodeId c_masterNodeId;
- SLList<Node> c_nodes;
- NdbNodeBitmask c_aliveNodes;
- NdbNodeBitmask c_preparingNodes;
-
- Uint32 RtoI(Uint32 sumaRef, bool dieOnNotFound = true);
-
+ NdbNodeBitmask c_alive_nodes;
+ NdbNodeBitmask c_started_nodes;
+ NdbNodeBitmask c_starting_nodes;
+
/**
* for all Suma's to keep track of other Suma's in Node group
*/
Uint32 c_nodeGroup;
Uint32 c_noNodesInGroup;
- Uint32 c_idInNodeGroup;
- NodeId c_nodesInGroup[MAX_REPLICAS];
-
- /**
- * don't seem to be used
- */
- ArrayPool<Node> c_nodePool;
- ArrayPool<SubCoordinator> c_subCoordinatorPool;
- DLList<SubCoordinator> c_runningSubscriptions;
+ Uint32 c_nodesInGroup[MAX_REPLICAS];
+ NdbNodeBitmask c_nodes_in_nodegroup_mask; // NodeId's of nodes in nodegroup
};
-
-inline Uint32
-Suma::RtoI(Uint32 sumaRef, bool dieOnNotFound) {
- for (Uint32 i = 0; i < c_noNodesInGroup; i++) {
- if (sumaRef == calcSumaBlockRef(c_nodesInGroup[i]))
- return i;
- }
- ndbrequire(!dieOnNotFound);
- return RNIL;
-}
#endif
--- 1.13/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp Wed Apr 27 23:32:59 2005
+++ 1.14/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp Fri May 13 12:58:12 2005
@@ -19,67 +19,105 @@
#include <Properties.hpp>
#include <Configuration.hpp>
-SumaParticipant::SumaParticipant(const Configuration & conf) :
+Suma::Suma(const Configuration & conf) :
SimulatedBlock(SUMA, conf),
c_metaSubscribers(c_subscriberPool),
c_removeDataSubscribers(c_subscriberPool),
- c_tables(c_tablePool_),
- c_subscriptions(c_subscriptionPool)
+ c_tables(c_tablePool),
+ c_subscriptions(c_subscriptionPool),
+ Restart(*this)
{
- BLOCK_CONSTRUCTOR(SumaParticipant);
+ c_masterNodeId = getOwnNodeId();
+
+ c_nodeGroup = c_noNodesInGroup = 0;
+ for (int i = 0; i < MAX_REPLICAS; i++) {
+ c_nodesInGroup[i] = 0;
+ }
+
+ // Add received signals
+ addRecSignal(GSN_STTOR, &Suma::execSTTOR);
+ addRecSignal(GSN_NDB_STTOR, &Suma::execNDB_STTOR);
+ addRecSignal(GSN_DUMP_STATE_ORD, &Suma::execDUMP_STATE_ORD);
+ addRecSignal(GSN_READ_NODESCONF, &Suma::execREAD_NODESCONF);
+ addRecSignal(GSN_API_FAILREQ, &Suma::execAPI_FAILREQ);
+ addRecSignal(GSN_NODE_FAILREP, &Suma::execNODE_FAILREP);
+ addRecSignal(GSN_NODE_START_REP, &Suma::execNODE_START_REP);
+ addRecSignal(GSN_INCL_NODEREQ, &Suma::execINCL_NODEREQ);
+ addRecSignal(GSN_CONTINUEB, &Suma::execCONTINUEB);
+ addRecSignal(GSN_SIGNAL_DROPPED_REP, &Suma::execSIGNAL_DROPPED_REP, true);
+ addRecSignal(GSN_UTIL_SEQUENCE_CONF, &Suma::execUTIL_SEQUENCE_CONF);
+ addRecSignal(GSN_UTIL_SEQUENCE_REF, &Suma::execUTIL_SEQUENCE_REF);
+ addRecSignal(GSN_CREATE_SUBID_REQ,
+ &Suma::execCREATE_SUBID_REQ);
+
+ addRecSignal(GSN_SUB_CREATE_CONF, &Suma::execSUB_CREATE_CONF);
+ addRecSignal(GSN_SUB_CREATE_REF, &Suma::execSUB_CREATE_REF);
+
+ addRecSignal(GSN_SUB_START_CONF, &Suma::execSUB_START_CONF);
+ addRecSignal(GSN_SUB_START_REF, &Suma::execSUB_START_REF);
+
+ addRecSignal(GSN_SUMA_START_ME_REQ, &Suma::execSUMA_START_ME_REQ);
+ addRecSignal(GSN_SUMA_START_ME_REF, &Suma::execSUMA_START_ME_REF);
+ addRecSignal(GSN_SUMA_START_ME_CONF, &Suma::execSUMA_START_ME_CONF);
+ addRecSignal(GSN_SUMA_HANDOVER_REQ, &Suma::execSUMA_HANDOVER_REQ);
+ addRecSignal(GSN_SUMA_HANDOVER_REF, &Suma::execSUMA_HANDOVER_REF);
+ addRecSignal(GSN_SUMA_HANDOVER_CONF, &Suma::execSUMA_HANDOVER_CONF);
+
+ addRecSignal(GSN_SUB_GCP_COMPLETE_ACK,
+ &Suma::execSUB_GCP_COMPLETE_ACK);
/**
* SUMA participant if
*/
- addRecSignal(GSN_SUB_CREATE_REQ, &SumaParticipant::execSUB_CREATE_REQ);
- addRecSignal(GSN_SUB_REMOVE_REQ, &SumaParticipant::execSUB_REMOVE_REQ);
- addRecSignal(GSN_SUB_START_REQ, &SumaParticipant::execSUB_START_REQ);
- addRecSignal(GSN_SUB_STOP_REQ, &SumaParticipant::execSUB_STOP_REQ);
- addRecSignal(GSN_SUB_STOP_REF, &SumaParticipant::execSUB_STOP_REF);
- addRecSignal(GSN_SUB_STOP_CONF, &SumaParticipant::execSUB_STOP_CONF);
- addRecSignal(GSN_SUB_SYNC_REQ, &SumaParticipant::execSUB_SYNC_REQ);
+ addRecSignal(GSN_SUB_CREATE_REQ, &Suma::execSUB_CREATE_REQ);
+ addRecSignal(GSN_SUB_REMOVE_REQ, &Suma::execSUB_REMOVE_REQ);
+ addRecSignal(GSN_SUB_START_REQ, &Suma::execSUB_START_REQ);
+ addRecSignal(GSN_SUB_STOP_REQ, &Suma::execSUB_STOP_REQ);
+ addRecSignal(GSN_SUB_STOP_REF, &Suma::execSUB_STOP_REF);
+ addRecSignal(GSN_SUB_STOP_CONF, &Suma::execSUB_STOP_CONF);
+ addRecSignal(GSN_SUB_SYNC_REQ, &Suma::execSUB_SYNC_REQ);
/**
* Dict interface
*/
- addRecSignal(GSN_DROP_TAB_CONF, &SumaParticipant::execDROP_TAB_CONF);
- addRecSignal(GSN_ALTER_TAB_CONF, &SumaParticipant::execALTER_TAB_CONF);
- addRecSignal(GSN_CREATE_TAB_CONF, &SumaParticipant::execCREATE_TAB_CONF);
+ addRecSignal(GSN_DROP_TAB_CONF, &Suma::execDROP_TAB_CONF);
+ addRecSignal(GSN_ALTER_TAB_CONF, &Suma::execALTER_TAB_CONF);
+ addRecSignal(GSN_CREATE_TAB_CONF, &Suma::execCREATE_TAB_CONF);
#if 0
- addRecSignal(GSN_LIST_TABLES_CONF, &SumaParticipant::execLIST_TABLES_CONF);
+ addRecSignal(GSN_LIST_TABLES_CONF, &Suma::execLIST_TABLES_CONF);
#endif
- addRecSignal(GSN_GET_TABINFO_CONF, &SumaParticipant::execGET_TABINFO_CONF);
- addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFOREF);
+ addRecSignal(GSN_GET_TABINFO_CONF, &Suma::execGET_TABINFO_CONF);
+ addRecSignal(GSN_GET_TABINFOREF, &Suma::execGET_TABINFOREF);
#if 0
- addRecSignal(GSN_GET_TABLEID_CONF, &SumaParticipant::execGET_TABLEID_CONF);
- addRecSignal(GSN_GET_TABLEID_REF, &SumaParticipant::execGET_TABLEID_REF);
+ addRecSignal(GSN_GET_TABLEID_CONF, &Suma::execGET_TABLEID_CONF);
+ addRecSignal(GSN_GET_TABLEID_REF, &Suma::execGET_TABLEID_REF);
#endif
/**
* Dih interface
*/
- addRecSignal(GSN_DI_FCOUNTCONF, &SumaParticipant::execDI_FCOUNTCONF);
- addRecSignal(GSN_DIGETPRIMCONF, &SumaParticipant::execDIGETPRIMCONF);
+ addRecSignal(GSN_DI_FCOUNTCONF, &Suma::execDI_FCOUNTCONF);
+ addRecSignal(GSN_DIGETPRIMCONF, &Suma::execDIGETPRIMCONF);
/**
* Scan interface
*/
- addRecSignal(GSN_SCAN_HBREP, &SumaParticipant::execSCAN_HBREP);
- addRecSignal(GSN_TRANSID_AI, &SumaParticipant::execTRANSID_AI);
- addRecSignal(GSN_SCAN_FRAGREF, &SumaParticipant::execSCAN_FRAGREF);
- addRecSignal(GSN_SCAN_FRAGCONF, &SumaParticipant::execSCAN_FRAGCONF);
+ addRecSignal(GSN_SCAN_HBREP, &Suma::execSCAN_HBREP);
+ addRecSignal(GSN_TRANSID_AI, &Suma::execTRANSID_AI);
+ addRecSignal(GSN_SCAN_FRAGREF, &Suma::execSCAN_FRAGREF);
+ addRecSignal(GSN_SCAN_FRAGCONF, &Suma::execSCAN_FRAGCONF);
#if 0
addRecSignal(GSN_SUB_SYNC_CONTINUE_REF,
- &SumaParticipant::execSUB_SYNC_CONTINUE_REF);
+ &Suma::execSUB_SYNC_CONTINUE_REF);
#endif
addRecSignal(GSN_SUB_SYNC_CONTINUE_CONF,
- &SumaParticipant::execSUB_SYNC_CONTINUE_CONF);
+ &Suma::execSUB_SYNC_CONTINUE_CONF);
/**
* Trigger stuff
*/
- addRecSignal(GSN_TRIG_ATTRINFO, &SumaParticipant::execTRIG_ATTRINFO);
- addRecSignal(GSN_FIRE_TRIG_ORD, &SumaParticipant::execFIRE_TRIG_ORD);
+ addRecSignal(GSN_TRIG_ATTRINFO, &Suma::execTRIG_ATTRINFO);
+ addRecSignal(GSN_FIRE_TRIG_ORD, &Suma::execFIRE_TRIG_ORD);
addRecSignal(GSN_CREATE_TRIG_REF, &Suma::execCREATE_TRIG_REF);
addRecSignal(GSN_CREATE_TRIG_CONF, &Suma::execCREATE_TRIG_CONF);
@@ -87,7 +125,7 @@
addRecSignal(GSN_DROP_TRIG_CONF, &Suma::execDROP_TRIG_CONF);
addRecSignal(GSN_SUB_GCP_COMPLETE_REP,
- &SumaParticipant::execSUB_GCP_COMPLETE_REP);
+ &Suma::execSUB_GCP_COMPLETE_REP);
/**
* @todo: fix pool sizes
@@ -101,7 +139,7 @@
ndb_mgm_get_int_parameter(p, CFG_DB_NO_ATTRIBUTES,
&noAttrs);
- c_tablePool_.setSize(noTables);
+ c_tablePool.setSize(noTables);
c_tables.setSize(noTables);
c_subscriptions.setSize(noTables);
@@ -124,69 +162,20 @@
c_buckets[i].handover = false;
c_buckets[i].handover_started = false;
c_buckets[i].handoverGCI = 0;
+ memset(c_buckets[i].m_nodes, 0, sizeof(c_buckets[i].m_nodes));
}
c_handoverToDo = false;
c_lastInconsistentGCI = RNIL;
c_lastCompleteGCI = RNIL;
c_nodeFailGCI = 0;
+ c_restart_server_node_id = 0; // Server for my NR
c_failedApiNodes.clear();
}
-
-SumaParticipant::~SumaParticipant()
-{
-}
-
-Suma::Suma(const Configuration & conf) :
- SumaParticipant(conf),
- Restart(*this),
- c_nodes(c_nodePool),
- c_runningSubscriptions(c_subCoordinatorPool)
-{
-
- c_nodePool.setSize(MAX_NDB_NODES);
- c_masterNodeId = getOwnNodeId();
-
- c_nodeGroup = c_noNodesInGroup = c_idInNodeGroup = 0;
- for (int i = 0; i < MAX_REPLICAS; i++) {
- c_nodesInGroup[i] = 0;
- }
-
- c_subCoordinatorPool.setSize(10);
-
- // Add received signals
- addRecSignal(GSN_STTOR, &Suma::execSTTOR);
- addRecSignal(GSN_NDB_STTOR, &Suma::execNDB_STTOR);
- addRecSignal(GSN_DUMP_STATE_ORD, &Suma::execDUMP_STATE_ORD);
- addRecSignal(GSN_READ_NODESCONF, &Suma::execREAD_NODESCONF);
- addRecSignal(GSN_API_FAILREQ, &Suma::execAPI_FAILREQ);
- addRecSignal(GSN_NODE_FAILREP, &Suma::execNODE_FAILREP);
- addRecSignal(GSN_INCL_NODEREQ, &Suma::execINCL_NODEREQ);
- addRecSignal(GSN_CONTINUEB, &Suma::execCONTINUEB);
- addRecSignal(GSN_SIGNAL_DROPPED_REP, &Suma::execSIGNAL_DROPPED_REP, true);
- addRecSignal(GSN_UTIL_SEQUENCE_CONF, &Suma::execUTIL_SEQUENCE_CONF);
- addRecSignal(GSN_UTIL_SEQUENCE_REF, &Suma::execUTIL_SEQUENCE_REF);
- addRecSignal(GSN_CREATE_SUBID_REQ,
- &Suma::execCREATE_SUBID_REQ);
-
- addRecSignal(GSN_SUB_CREATE_CONF, &Suma::execSUB_CREATE_CONF);
- addRecSignal(GSN_SUB_CREATE_REF, &Suma::execSUB_CREATE_REF);
-
- addRecSignal(GSN_SUB_START_CONF, &Suma::execSUB_START_CONF);
- addRecSignal(GSN_SUB_START_REF, &Suma::execSUB_START_REF);
-
- addRecSignal(GSN_SUMA_START_ME, &Suma::execSUMA_START_ME);
- addRecSignal(GSN_SUMA_HANDOVER_REQ, &Suma::execSUMA_HANDOVER_REQ);
- addRecSignal(GSN_SUMA_HANDOVER_CONF, &Suma::execSUMA_HANDOVER_CONF);
-
- addRecSignal(GSN_SUB_GCP_COMPLETE_ACK,
- &Suma::execSUB_GCP_COMPLETE_ACK);
-}
Suma::~Suma()
{
}
BLOCK_FUNCTIONS(Suma)
-BLOCK_FUNCTIONS(SumaParticipant)
--- 1.18/storage/ndb/src/kernel/vm/SimulatedBlock.cpp Fri Apr 8 02:44:07 2005
+++ 1.19/storage/ndb/src/kernel/vm/SimulatedBlock.cpp Fri May 13 12:58:12 2005
@@ -140,6 +140,7 @@
a[GSN_UTIL_UNLOCK_REF] = &SimulatedBlock::execUTIL_UNLOCK_REF;
a[GSN_UTIL_UNLOCK_CONF] = &SimulatedBlock::execUTIL_UNLOCK_CONF;
a[GSN_READ_CONFIG_REQ] = &SimulatedBlock::execREAD_CONFIG_REQ;
+ a[GSN_NODE_START_REP] = &SimulatedBlock::execNODE_START_REP;
}
void
@@ -903,6 +904,11 @@
ContinueFragmented * sig = (ContinueFragmented*)signal->getDataPtrSend();
sig->line = __LINE__;
sendSignal(reference(), GSN_CONTINUE_FRAGMENTED, signal, 1, JBB);
+}
+
+void
+SimulatedBlock::execNODE_START_REP(Signal* signal)
+{
}
#ifdef VM_TRACE_TIME
--- 1.12/storage/ndb/src/kernel/vm/SimulatedBlock.hpp Fri Apr 8 02:44:07 2005
+++ 1.13/storage/ndb/src/kernel/vm/SimulatedBlock.hpp Fri May 13 12:58:12 2005
@@ -400,7 +400,8 @@
void execSIGNAL_DROPPED_REP(Signal* signal);
void execCONTINUE_FRAGMENTED(Signal* signal);
-
+ void execNODE_START_REP(Signal* signal);
+
Uint32 c_fragmentIdCounter;
ArrayPool<FragmentInfo> c_fragmentInfoPool;
DLHashTable<FragmentInfo> c_fragmentInfoHash;
| Thread |
|---|
| • bk commit into 5.1 tree (joreland:1.1850) | jonas.oreland | 13 May |