)]}'
{"oslo/messaging/_drivers/impl_zmq.py":[{"author":{"_account_id":935,"name":"James Page","email":"ringo.page@gmail.com","username":"james-page"},"change_message_id":"9cfcfe8319563209b54305e0513f06ad6acf9fe3","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"# ZeroMQ Context, must be global. It is thread-local so that"},{"line_number":92,"context_line":"# every thread can have its own Context."},{"line_number":93,"context_line":"ZMQ_CTX \u003d threading.local()"},{"line_number":94,"context_line":"matchmaker \u003d None  # memoized matchmaker object"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_d3303458","line":93,"updated":"2014-10-17 10:02:56.000000000","message":"Although this is just used to store the zmq context, maybe renaming it to _CTX_STORE or suchlike might be a nice idea - this is  private construct for the package and is just a reference for thread local object.\n\nLi - I\u0027ve patched this change into out Juno test environment and we have functional neutron-server with both api and rpc workers set \u003e 0  (2 each in our test case).","commit_id":"f92ff6a2cf452c99f7423c65aa42c9e1085ede26"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"6684cd1b5a304194eca809d65784c974270aa5f4","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"# ZeroMQ Context, must be global. It is thread-local so that"},{"line_number":92,"context_line":"# every thread can have its own Context."},{"line_number":93,"context_line":"ZMQ_CTX \u003d threading.local()"},{"line_number":94,"context_line":"matchmaker \u003d None  # memoized matchmaker object"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_3b9d190b","line":93,"updated":"2014-10-15 10:57:03.000000000","message":"Please put \u0027bug/1364814\u0027 in Gerrit Topic.\n\nI\u0027ve merged this fix into my ZeroMQ environment. However, it doesn\u0027t work.\n\nAfter I set api_workers \u003d 4, the neutron-server cannot respond any api requests.\n\nThe process is stuck in socket.recv() function.\n\nAFAIK, API workers is based upon os.fork() which is fully multi-process. ZMQ_CTX is thread-local in nature.","commit_id":"f92ff6a2cf452c99f7423c65aa42c9e1085ede26"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"102d0880e7fd4161d494d97762222b69c8e9570d","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"# ZeroMQ Context, must be global. It is thread-local so that"},{"line_number":92,"context_line":"# every thread can have its own Context."},{"line_number":93,"context_line":"ZMQ_CTX \u003d threading.local()"},{"line_number":94,"context_line":"matchmaker \u003d None  # memoized matchmaker object"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_1e972349","line":93,"in_reply_to":"baa201ad_d3303458","updated":"2014-10-17 10:39:55.000000000","message":"@James, done\n\n@Li Ma, ZMQ_CTX is not thread-local in nature. I have performed some synthetic tests and checked that when we do os.fork()  ZMQ_CTX is not initialized for the new process.   \n\n % cat a.py\nimport os\nimport b\n\nif os.fork() \u003d\u003d 0:\n    import b\n\n % cat b.py\nprint(\"imported b\")\n\n% python a.py\n    imported b","commit_id":"f92ff6a2cf452c99f7423c65aa42c9e1085ede26"},{"author":{"_account_id":935,"name":"James Page","email":"ringo.page@gmail.com","username":"james-page"},"change_message_id":"9cfcfe8319563209b54305e0513f06ad6acf9fe3","unresolved":false,"context_lines":[{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    global ZMQ_CTX"},{"line_number":820,"context_line":"    if not hasattr(ZMQ_CTX, \u0027ctx\u0027):"},{"line_number":821,"context_line":"        ZMQ_CTX.ctx \u003d zmq.Context(CONF.rpc_zmq_contexts)"},{"line_number":822,"context_line":"    return ZMQ_CTX.ctx"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_93422ca9","line":821,"updated":"2014-10-17 10:02:56.000000000","message":"If you like my idea re renaming ZMQ_CTX then this should switch (with the above) to _CTX_STORE.zmq_ctx I think","commit_id":"f92ff6a2cf452c99f7423c65aa42c9e1085ede26"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"102d0880e7fd4161d494d97762222b69c8e9570d","unresolved":false,"context_lines":[{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    global ZMQ_CTX"},{"line_number":820,"context_line":"    if not hasattr(ZMQ_CTX, \u0027ctx\u0027):"},{"line_number":821,"context_line":"        ZMQ_CTX.ctx \u003d zmq.Context(CONF.rpc_zmq_contexts)"},{"line_number":822,"context_line":"    return ZMQ_CTX.ctx"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_1e7e4319","line":821,"in_reply_to":"baa201ad_93422ca9","updated":"2014-10-17 10:39:55.000000000","message":"Done","commit_id":"f92ff6a2cf452c99f7423c65aa42c9e1085ede26"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d6a1b5a46f82c1399047af85eb6455f28d82d71f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, addr, zmq_type, bind\u003dTrue, subscribe\u003dNone):"},{"line_number":121,"context_line":"        if not zmq:"},{"line_number":122,"context_line":"            raise ImportError(\"Failed to import eventlet.green.zmq\")"},{"line_number":123,"context_line":"        self.ctxt \u003d zmq.Context(CONF.rpc_zmq_contexts)"},{"line_number":124,"context_line":"        self.sock \u003d self.ctxt.socket(zmq_type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_e956fe28","line":121,"updated":"2014-11-18 15:13:35.000000000","message":"Can we move the import Error in ZmqDriver.__init__ to fail earlier?\n\nOtherwise the rest of the change looks good.","commit_id":"f2753aba6335939e740ecdcf22d83ef62f1f8f8f"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"555847ba4910434ed826d5256e94f824b77b05a1","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, addr, zmq_type, bind\u003dTrue, subscribe\u003dNone):"},{"line_number":121,"context_line":"        if not zmq:"},{"line_number":122,"context_line":"            raise ImportError(\"Failed to import eventlet.green.zmq\")"},{"line_number":123,"context_line":"        self.ctxt \u003d zmq.Context(CONF.rpc_zmq_contexts)"},{"line_number":124,"context_line":"        self.sock \u003d self.ctxt.socket(zmq_type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_8443a111","line":121,"in_reply_to":"5a890539_647b157b","updated":"2014-11-18 15:19:11.000000000","message":"Done","commit_id":"f2753aba6335939e740ecdcf22d83ef62f1f8f8f"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9c49a463364b828f38e2ea81e85455d80feafc02","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, addr, zmq_type, bind\u003dTrue, subscribe\u003dNone):"},{"line_number":121,"context_line":"        if not zmq:"},{"line_number":122,"context_line":"            raise ImportError(\"Failed to import eventlet.green.zmq\")"},{"line_number":123,"context_line":"        self.ctxt \u003d zmq.Context(CONF.rpc_zmq_contexts)"},{"line_number":124,"context_line":"        self.sock \u003d self.ctxt.socket(zmq_type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_647b157b","line":121,"in_reply_to":"5a890539_e956fe28","updated":"2014-11-18 15:17:05.000000000","message":"Okay, will move it in the next patchset","commit_id":"f2753aba6335939e740ecdcf22d83ef62f1f8f8f"}]}
