List:Commits« Previous MessageNext Message »
From:John David Duncan Date:April 27 2010 9:48pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jdd:3509) Bug#53008
View as plain text  
#At file:///Users/jdd/Desktop/dev/bug53008-70/ based on revid:jonas@stripped

 3509 John David Duncan	2010-04-27
      Another alternative for bug#53008.  This one actually implements --skip-config-cache, --disable-config-cache, etc., as requested in the bug report.

    modified:
      storage/ndb/src/mgmsrv/ConfigManager.cpp
      storage/ndb/src/mgmsrv/MgmtSrvr.hpp
      storage/ndb/src/mgmsrv/main.cpp
=== modified file 'storage/ndb/src/mgmsrv/ConfigManager.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigManager.cpp	2010-01-29 10:38:28 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigManager.cpp	2010-04-27 21:47:22 +0000
@@ -1730,8 +1730,21 @@ ConfigManager::run()
 {
   assert(m_facade);
   SignalSender & ss = * m_ss;
-  ss.lock();
 
+  if (!m_opts.config_cache)   {
+    ndbout_c("==ConfigManager disabled==");
+
+    delete m_new_config; // maybe?
+
+    // set the config as confirmed, then idle.
+    m_config_state = CS_CONFIRMED;
+    while(!is_stopped())
+      NdbSleep_SecSleep(1);
+    return;
+  }  
+
+  ss.lock();
+  
   // Build bitmaks of all mgm nodes in config
   m_config->get_nodemask(m_all_mgm, NDB_MGM_NODE_TYPE_MGM);
 

=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.hpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2010-04-09 11:24:12 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2010-04-27 21:47:22 +0000
@@ -115,6 +115,7 @@ public:
     int interactive;
     const char* config_filename;
     int mycnf;
+    int config_cache;
     const char* bind_address;
     int no_nodeid_checks;
     int print_full_config;

=== modified file 'storage/ndb/src/mgmsrv/main.cpp'
--- a/storage/ndb/src/mgmsrv/main.cpp	2010-04-07 09:14:43 +0000
+++ b/storage/ndb/src/mgmsrv/main.cpp	2010-04-27 21:47:22 +0000
@@ -127,6 +127,10 @@ static struct my_option my_long_options[
     "Directory for the binary configuration files",
     (uchar**) &opts.configdir, (uchar**) &opts.configdir, 0,
     GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+  { "config-cache", 256,
+    "Enable configuration cache and change management",
+    (uchar**) &opts.config_cache, (uchar**) &opts.config_cache, 0,
+    GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
   { "verbose", 'v',
     "Write more log messages",
     (uchar**) &opts.verbose, (uchar**) &opts.verbose, 0,


Attachment: [text/bzr-bundle] bzr/jdd@sun.com-20100427214722-ikrbqexg539gn7wz.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jdd:3509) Bug#53008John David Duncan27 Apr