List:Internals« Previous MessageNext Message »
From:Stewart Smith Date:September 16 2005 7:36am
Subject:bk commit into 5.1 tree (stewart:1.1908)
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.1908 05/09/16 15:35:58 stewart@stripped +1 -0
  WL#2073 config reload
  
  Implement mgm client config reload using configuration lock

  storage/ndb/src/mgmclient/CommandInterpreter.cpp
    1.57 05/09/16 15:35:54 stewart@stripped +29 -3
    Implement mgm client interface to configuration reload

# 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/wl2703

--- 1.56/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2005-09-01 18:30:45 +10:00
+++ 1.57/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2005-09-16 15:35:54 +10:00
@@ -2323,12 +2323,38 @@
 void
 CommandInterpreter::executeConfigReload()
 {
+  int res;
   ndbout << "Reloading configuration..." << endl;
 
-  ndbout << "Config Reload result: "
-	 << ndb_mgm_config_reload(m_mgmsrv,true)
-	 << endl;
+  res= ndb_mgm_config_lock(m_mgmsrv,true);
+  if(res<0)
+  {
+    ndbout << "Failure obtaining configuration lock. (Internal Error "
+	   << res << ")" << endl;
+    goto done;
+  }
 
+  res= ndb_mgm_config_reload(m_mgmsrv,true);
+  if(res<0)
+  {
+    ndbout << "Failure reloading configuration file. (Internal Error "
+	   << res << ")" << endl;
+    goto err;
+  }
+
+  res= ndb_mgm_config_unlock(m_mgmsrv,true); // commit
+  if(res<0)
+    ndbout << "Failure during commit of configuration change. "
+	   << "(Internal Error " << res << "). Try restarting all "
+	   << "management servers." << endl;
+
+done:
+  return;
+err:
+  res= ndb_mgm_config_unlock(m_mgmsrv,false); // rollback
+  if(res<0)
+    ndbout << "Failure during rollback of configuration (Internal Error "
+	   << res << "). Try restarting all management servers." << endl;
   return;
 }
 
Thread
bk commit into 5.1 tree (stewart:1.1908)Stewart Smith16 Sep