List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:November 23 2006 11:40am
Subject:bk commit into 5.2 tree (stewart:1.2116)
View as plain text  
Below is the list of changes that have just been committed into a local
5.2 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-11-23 22:40:30+11:00, stewart@willster.(none) +6 -0
  WL#1504 NDB Online Add Node
  
  few small cleanups sitting in tree.

  storage/ndb/include/kernel/NodeState.hpp@stripped, 2006-11-23 22:40:27+11:00, stewart@willster.(none) +7 -7
    Make some members private, add getNodeGroup method

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2006-11-23 22:40:27+11:00, stewart@willster.(none) +11 -5
    use correct type for iterator, add a small comment about ALTER_NODEGROUP_REQ

  storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp@stripped, 2006-11-23 22:40:27+11:00, stewart@willster.(none) +3 -3
    change getNodeGroup() to function returning nodegroup, remove
    local copy of ng id

  storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2006-11-23 22:40:27+11:00, stewart@willster.(none) +13 -8
    getNodeGroup no longer needed in start phase 6 - we return the value from the function.

  storage/ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-11-23 22:40:27+11:00, stewart@willster.(none) +1 -1
    use new getNodeGroup in NodeState

  storage/ndb/src/ndbapi/TransporterFacade.hpp@stripped, 2006-11-23 22:40:27+11:00, stewart@willster.(none) +3 -3
    use getNodeGroup and Single User API methods in NodeState 

# 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.2/wl1504-add-node

--- 1.5/storage/ndb/include/kernel/NodeState.hpp	2005-04-08 10:43:49 +10:00
+++ 1.6/storage/ndb/include/kernel/NodeState.hpp	2006-11-23 22:40:27 +11:00
@@ -117,11 +117,6 @@
   Uint32 startLevel;
 
   /**
-   * Node group 
-   */
-  Uint32 nodeGroup;  // valid when startLevel == SL_STARTING
-
-  /**
    * Dynamic id
    */ 
   union {
@@ -145,12 +140,11 @@
 
     
   };
-  Uint32 singleUserMode;
-  Uint32 singleUserApi;          //the single user node
 
   BitmaskPOD<NdbNodeBitmask::Size> m_connected_nodes;
 
   void setDynamicId(Uint32 dynamic);
+  Uint32 getNodeGroup() const { return nodeGroup; };
   void setNodeGroup(Uint32 group);
   void setSingleUser(Uint32 s);
   void setSingleUserApi(Uint32 n);
@@ -177,6 +171,12 @@
   Uint32 getSingleUserApi() const;
 
   friend NdbOut & operator<<(NdbOut&, const NodeState&); 
+
+private:
+  Uint32 singleUserMode;
+  Uint32 singleUserApi;          //the single user node
+
+  Uint32 nodeGroup;  // valid when startLevel == SL_STARTING
 };
 
 inline

--- 1.79/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-03-11 02:00:13 +11:00
+++ 1.80/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-11-23 22:40:27 +11:00
@@ -15621,10 +15621,20 @@
 	     DropFilegroupImplReq::SignalLength, JBB);
 }
 
+/*
+  ALTER_NODEGROUP_REQ
+  -------------------
+
+  Parse API request
+
+  trans_key
+
+  start internal protocols
+ */
 void
 Dbdict::execALTER_NODEGROUP_REQ(Signal* signal)
 {
-  int i;
+  Uint32 i;
 
   jamEntry();
 
@@ -15919,7 +15929,3 @@
 
   execute(signal, op->m_callback, 0);
 }
-
-
-
-// in commit done, unlock dict

--- 1.6/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp	2005-10-07 09:06:20 +10:00
+++ 1.7/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp	2006-11-23 22:40:27 +11:00
@@ -263,8 +263,8 @@
   void waitpoint61Lab(Signal* signal);
   void waitpoint71Lab(Signal* signal);
 
-  void updateNodeState(Signal* signal, const NodeState & newState) const ;
-  void getNodeGroup(Signal* signal);
+  void updateNodeState(Signal* signal, const NodeState & newState);
+  Uint32 getNodeGroup(Signal* signal);
 
   // Initialisation
   void initData();
@@ -309,7 +309,7 @@
   Uint16 cdynamicNodeId;
 
   Uint32 c_fsRemoveCount;
-  Uint32 c_nodeGroup;
+
   void clearFilesystem(Signal* signal);
   void execFSREMOVECONF(Signal* signal);
 

--- 1.29/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-01-30 21:09:48 +11:00
+++ 1.30/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-11-23 22:40:27 +11:00
@@ -289,8 +289,8 @@
     break;
   case 6:
     jam();
-    getNodeGroup(signal);
-    // Fall through
+    //getNodeGroup(signal);
+    sendSttorry(signal);
     break;
   case ZSTART_PHASE_8:
     jam();
@@ -307,7 +307,7 @@
   }//switch
 }//Ndbcntr::execSTTOR()
 
-void
+Uint32
 Ndbcntr::getNodeGroup(Signal* signal){
   jam();
   CheckNodeGroups * sd = (CheckNodeGroups*)signal->getDataPtrSend();
@@ -315,8 +315,9 @@
   EXECUTE_DIRECT(DBDIH, GSN_CHECKNODEGROUPSREQ, signal, 
 		 CheckNodeGroups::SignalLength);
   jamEntry();
-  c_nodeGroup = sd->output;
-  sendSttorry(signal);
+  return sd->output;
+//  c_nodeGroup = sd->output;
+//  sendSttorry(signal);
 }
 
 /*******************************/
@@ -2003,12 +2004,14 @@
 #endif
 }//Ndbcntr::execSET_VAR_REQ()
 
-void Ndbcntr::updateNodeState(Signal* signal, const NodeState& newState) const{
+void Ndbcntr::updateNodeState(Signal* signal, const NodeState& newState) {
   NodeStateRep * const stateRep = (NodeStateRep *)&signal->theData[0];
 
+  Uint32 nodeGroup= getNodeGroup(signal);
+
   stateRep->nodeState = newState;
   stateRep->nodeState.masterNodeId = cmasterNodeId;
-  stateRep->nodeState.setNodeGroup(c_nodeGroup);
+  stateRep->nodeState.setNodeGroup(nodeGroup);
   
   for(Uint32 i = 0; i<ALL_BLOCKS_SZ; i++){
     sendSignal(ALL_BLOCKS[i].Ref, GSN_NODE_STATE_REP, signal,
@@ -2430,6 +2433,8 @@
 void Ndbcntr::execWAIT_GCP_CONF(Signal* signal){
   jamEntry();
 
+  Uint32 nodeGroup= getNodeGroup(signal);
+
   ndbrequire(StopReq::getSystemStop(c_stopRec.stopReq.requestInfo));
   NodeState newState(NodeState::SL_STOPPING_3, true); 
 
@@ -2439,7 +2444,7 @@
   NodeStateRep * rep = (NodeStateRep *)&signal->theData[0];
   rep->nodeState = newState;
   rep->nodeState.masterNodeId = cmasterNodeId;
-  rep->nodeState.setNodeGroup(c_nodeGroup);
+  rep->nodeState.setNodeGroup(nodeGroup);
   EXECUTE_DIRECT(QMGR, GSN_NODE_STATE_REP, signal, NodeStateRep::SignalLength);
 
   if(StopReq::getPerformRestart(c_stopRec.stopReq.requestInfo)){

--- 1.91/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-02-21 22:51:15 +11:00
+++ 1.92/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-11-23 22:40:27 +11:00
@@ -1347,7 +1347,7 @@
   }
 
   * dynamic = node.m_state.dynamicId;
-  * nodegroup = node.m_state.nodeGroup;
+  * nodegroup = node.m_state.getNodeGroup();
   * connectCount = node.m_info.m_connectCount;
   
   switch(node.m_state.startLevel){

--- 1.27/storage/ndb/src/ndbapi/TransporterFacade.hpp	2005-09-15 18:42:04 +10:00
+++ 1.28/storage/ndb/src/ndbapi/TransporterFacade.hpp	2006-11-23 22:40:27 +11:00
@@ -343,7 +343,7 @@
 inline
 Uint32
 TransporterFacade::getNodeGrp(NodeId n) const {
-  return theClusterMgr->getNodeInfo(n).m_state.nodeGroup;
+  return theClusterMgr->getNodeInfo(n).m_state.getNodeGroup();
 }
 
 
@@ -376,8 +376,8 @@
   const Uint32 startLevel = node.m_state.startLevel;
 
   if (node.m_info.m_type == NodeInfo::DB) {
-    if(node.m_state.singleUserMode && 
-       ownId() == node.m_state.singleUserApi) {
+    if(node.m_state.getSingleUserMode() && 
+       ownId() == node.m_state.getSingleUserApi()) {
       return (node.compatible && 
               (node.m_state.startLevel == NodeState::SL_STOPPING_1 ||
                node.m_state.startLevel == NodeState::SL_STARTED ||
Thread
bk commit into 5.2 tree (stewart:1.2116)Stewart Smith23 Nov