List:Internals« Previous MessageNext Message »
From:Stewart Smith Date:November 29 2005 5:25pm
Subject:bk commit into 5.1 tree (stewart:1.1982)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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
  1.1982 05/11/29 18:25:33 stewart@stripped +2 -0
  WL#1504 Cluster online add/drop node
  
  with the previous patch to add Configured nodes, you can now add and drop them.
  
  (rolling restart still required) 

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
    1.40 05/11/29 18:25:29 stewart@stripped +22 -0
    implement discovery of dropped ndbd nodes, rewriting the SYSFILE appropriately.
    
    (i.e. nodes are now NotDefined).
    
    You can now add and remove Configured nodes

  storage/ndb/src/common/transporter/TransporterRegistry.cpp
    1.64 05/11/29 18:25:29 stewart@stripped +2 -2
    temporary hack to work around being unable to set parameters for nodes that
    no longer exist

# 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.1/wl1504

--- 1.63/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2005-11-04 21:09:59 +01:00
+++ 1.64/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2005-11-29 18:25:29 +01:00
@@ -1614,8 +1614,8 @@
 	       ndb_mgm_get_latest_error_desc(*h),
 	       ndb_mgm_get_latest_error(*h));
       ndbout_c("%s: %d", __FILE__, __LINE__);
-      ndb_mgm_destroy_handle(h);
-      return NDB_INVALID_SOCKET;
+      //ndb_mgm_destroy_handle(h);
+//      return NDB_INVALID_SOCKET;
     }
 
   /**

--- 1.39/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2005-11-29 14:14:49 +01:00
+++ 1.40/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2005-11-29 18:25:29 +01:00
@@ -651,6 +651,13 @@
       infoEvent("Overriding node status from master for %u (NS_Configured)",
 		i);
     }
+    if (Sysfile::getNodeStatus(i, SYSFILE->nodeStatus)== Sysfile::NS_NotDefined
+	&& Sysfile::getNodeStatus(i, newSys->nodeStatus) != Sysfile::NS_NotDefined)
+    {
+      Sysfile::setNodeStatus(i, newSys->nodeStatus, Sysfile::NS_NotDefined);
+      infoEvent("Overriding node status from master for %u (NS_NotDefined)",
+		i);
+    }
   }
   memcpy(sysfileData, cdata, sizeof(sysfileData));
   SYSFILE->m_restart_seq = tmp;
@@ -1481,6 +1488,14 @@
 	jam();
 	continue;
       }
+      infoEvent("Node %u status %u", i, stat);
+      if (!tmp.get(i) && stat != Sysfile::NS_NotDefined)
+      {
+	jam();
+	Sysfile::setNodeStatus(i, SYSFILE->nodeStatus, Sysfile::NS_NotDefined);
+	infoEvent("Detected ndbd node has been removed: %u", i);
+	continue;
+      }
 
       /**
        * We have a new storage node defined.
@@ -1642,6 +1657,13 @@
     {
       Sysfile::setNodeStatus(i, newSys->nodeStatus, Sysfile::NS_Configured);
       infoEvent("Overriding node status from master for %u (NS_Configured)",
+		i);
+    }
+    if (Sysfile::getNodeStatus(i, SYSFILE->nodeStatus)== Sysfile::NS_NotDefined
+	&& Sysfile::getNodeStatus(i, newSys->nodeStatus) != Sysfile::NS_NotDefined)
+    {
+      Sysfile::setNodeStatus(i, newSys->nodeStatus, Sysfile::NS_NotDefined);
+      infoEvent("Overriding node status from master for %u (NS_NotDefined)",
 		i);
     }
   }
Thread
bk commit into 5.1 tree (stewart:1.1982)Stewart Smith29 Nov