List:Commits« Previous MessageNext Message »
From:Dyre Tjeldvoll Date:October 4 2012 7:09am
Subject:bzr push into mysql-5.5-cluster-7.2 branch (Dyre.Tjeldvoll:4083 to 4084)
View as plain text  
 4084 Dyre Tjeldvoll	2012-10-04
      Adding SocketServer.ThreadingMixIn as base class to make the backend web server multi-threaded

 4083 Dyre Tjeldvoll	2012-10-03
      Support configurable unit tests for backend

=== modified file 'storage/ndb/mcc/'
--- a/storage/ndb/mcc/	2012-10-02 08:08:00 +0000
+++ b/storage/ndb/mcc/	2012-10-04 07:08:54 +0000
@@ -44,6 +44,7 @@ import optparse
 import webbrowser
 import zipfile
 import tempfile
+import threading
 import util
 from clusterhost import produce_ABClusterHost 
@@ -254,6 +255,11 @@ def handle_removeClusterReq(req, body):
     directories belonging to the cluster."""
+def log_thread_name():
+    cur_thread = threading.current_thread()
+    _logger.debug("cur_thread="+str(
 class ConfiguratorHandler(BaseHTTPServer.BaseHTTPRequestHandler):
     """Handler class for web server requests to the configurator backend. To be 
     used with a BaseHTTPServer.HTTPServer to create a working server."""
@@ -268,7 +274,7 @@ class ConfiguratorHandler(BaseHTTPServer
     def do_GET(self):
         """Handles GET requests by returning the specified file. Attempts to guess 
         the MIME type and set the Content-Type accordingly."""
+        log_thread_name()
         f = None
@@ -294,6 +300,7 @@ class ConfiguratorHandler(BaseHTTPServer
     def do_POST(self):
         """Handles POST requests, in the form of json-serialized command (request) 
         objects, from the frontend."""
+        log_thread_name()
             # Assume all post requests are json
             assert  'application/json' in self.headers['Content-Type']
@@ -330,7 +337,8 @@ class ConfiguratorHandler(BaseHTTPServer
-class ConfiguratorServer(BaseHTTPServer.HTTPServer):
+class ConfiguratorServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
+    """Specialization of HTTPServer which adds ssl wrapping, shutdown on close and MT (by also inheriting SocketServer.ThreadingMixIn."""
     def __init__(self,  opts):
         # Cannot use super() here, as BaseServer is not a new-style class
         SocketServer.TCPServer.__init__(self, (opts['server'], opts['port']), ConfiguratorHandler)

No bundle (reason: useless for push emails).
bzr push into mysql-5.5-cluster-7.2 branch (Dyre.Tjeldvoll:4083 to 4084) Dyre Tjeldvoll4 Oct