)]}'
{"oslo/messaging/_drivers/amqpdriver.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"185436988d508f5b791f12c40d3c4805790c6f02","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self.msg_id_cache \u003d rpc_amqp._MsgIdCache()"},{"line_number":91,"context_line":"        self.incoming \u003d []"},{"line_number":92,"context_line":"        self._dispatch_lock \u003d threading.Lock()"},{"line_number":93,"context_line":"        self._dispatch_callbacks \u003d []"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def __call__(self, message):"},{"line_number":96,"context_line":"        # FIXME(markmc): logging isn\u0027t driver specific"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ed54b123","line":93,"updated":"2014-07-12 00:34:40.000000000","message":"If u use a collections.deque u don\u0027t need the lock (it\u0027s inherently thread-safe with regards to appends and pops).","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"b1e14eb338212bcb91734c46b877d4d1caeeca3d","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self.msg_id_cache \u003d rpc_amqp._MsgIdCache()"},{"line_number":91,"context_line":"        self.incoming \u003d []"},{"line_number":92,"context_line":"        self._dispatch_lock \u003d threading.Lock()"},{"line_number":93,"context_line":"        self._dispatch_callbacks \u003d []"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def __call__(self, message):"},{"line_number":96,"context_line":"        # FIXME(markmc): logging isn\u0027t driver specific"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_d3486a2f","line":93,"in_reply_to":"baada198_ed54b123","updated":"2014-07-12 02:26:13.000000000","message":"Ok. will do","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"185436988d508f5b791f12c40d3c4805790c6f02","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        with self._dispatch_lock:"},{"line_number":134,"context_line":"            self._dispatch_callbacks.append(callback)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _get_dispatch_callbacks(self):"},{"line_number":137,"context_line":"        while self._dispatch_callbacks:"},{"line_number":138,"context_line":"            with self._dispatch_lock:"},{"line_number":139,"context_line":"                callback \u003d self._dispatch_callbacks.pop()"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_cd228db8","line":136,"updated":"2014-07-12 00:34:40.000000000","message":"So this depletes the callbacks, is that intended?\n\nWhat refills them, is it needed to refill them?","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3df9ebe3744eced09caf23bbd8e4517dfffeee19","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        with self._dispatch_lock:"},{"line_number":134,"context_line":"            self._dispatch_callbacks.append(callback)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _get_dispatch_callbacks(self):"},{"line_number":137,"context_line":"        while self._dispatch_callbacks:"},{"line_number":138,"context_line":"            with self._dispatch_lock:"},{"line_number":139,"context_line":"                callback \u003d self._dispatch_callbacks.pop()"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_53d9ba55","line":136,"in_reply_to":"baada198_93435212","updated":"2014-07-12 02:43:21.000000000","message":"Thanks, makes sense now. Although maybe the method name should be different, a get_method seems misnamed since this actually removes items (and not just gets). Maybe it can be called \u0027drain_dispatch_callbacks\u0027?","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"b1e14eb338212bcb91734c46b877d4d1caeeca3d","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        with self._dispatch_lock:"},{"line_number":134,"context_line":"            self._dispatch_callbacks.append(callback)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _get_dispatch_callbacks(self):"},{"line_number":137,"context_line":"        while self._dispatch_callbacks:"},{"line_number":138,"context_line":"            with self._dispatch_lock:"},{"line_number":139,"context_line":"                callback \u003d self._dispatch_callbacks.pop()"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_93435212","line":136,"in_reply_to":"baada198_cd228db8","updated":"2014-07-12 02:26:13.000000000","message":"this callback queue is filled when you call an ack/reque from dispatcher. since dispatcher can work in it\u0027s own greenthread it cannot send ack directly cause connection may be busy with something else. Instead it adds ack callback to this queue and when connection is available it sends all of the at once. (see AMQPMessage ack/requeue methods)","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"}],"oslo/messaging/_executors/impl_blocking.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"185436988d508f5b791f12c40d3c4805790c6f02","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def __init__(self, conf, callback):"},{"line_number":27,"context_line":"        self._callback \u003d callback"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __call__(self, *args, **kwargs):"},{"line_number":30,"context_line":"        self._callback(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_d8108950","line":29,"updated":"2014-07-12 00:34:40.000000000","message":"So It would be really nice to have this return a concurrent.Future object, even if that future is actually completed by this executor.\n\nhttps://docs.python.org/dev/library/concurrent.futures.html#future-objects\n\nFor example it can use something like the following:\n\nhttps://github.com/openstack/taskflow/blob/master/taskflow/utils/async_utils.py#L37\n\nThen the common API is that __call__ must return a future, and the caller will just get the values out of that future, whether its async or not is up to the executor. What do u think?","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"b1e14eb338212bcb91734c46b877d4d1caeeca3d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def __init__(self, conf, callback):"},{"line_number":27,"context_line":"        self._callback \u003d callback"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __call__(self, *args, **kwargs):"},{"line_number":30,"context_line":"        self._callback(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_134f4235","line":29,"in_reply_to":"baada198_d8108950","updated":"2014-07-12 02:26:13.000000000","message":"I think it will be ok to do in next patch. For now let\u0027s keep it simple.","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"}],"oslo/messaging/_executors/impl_eventlet.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"185436988d508f5b791f12c40d3c4805790c6f02","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        self._callback \u003d callback"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __call__(self, *args, **kwargs):"},{"line_number":38,"context_line":"        self._greenpool.spawn(self._callback, *args, **kwargs)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def wait(self):"},{"line_number":41,"context_line":"        self._greenpool.waitall()"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_f819cd7a","line":38,"updated":"2014-07-12 00:34:40.000000000","message":"Same thing as before, if the common api result from this was a future, then it can use eventlet, or asyncio, or other, and since they all return a future object the caller doesn\u0027t have to care how the future is populated (as long as it is).","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"b1e14eb338212bcb91734c46b877d4d1caeeca3d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        self._callback \u003d callback"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __call__(self, *args, **kwargs):"},{"line_number":38,"context_line":"        self._greenpool.spawn(self._callback, *args, **kwargs)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def wait(self):"},{"line_number":41,"context_line":"        self._greenpool.waitall()"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_53645ab8","line":38,"in_reply_to":"baada198_f819cd7a","updated":"2014-07-12 02:26:13.000000000","message":"Same thing as before. We can do it in the next patch. Right now I tend to keep behavior that was before.","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"}],"oslo/messaging/executor.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"ad64d8d25cfb451c36c934d50ed393797837cfac","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    def __call__(self, *args, **kwargs):"},{"line_number":57,"context_line":"        self._greenpool.spawn(self._callback, *args, **kwargs)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def wait(self):"},{"line_number":60,"context_line":"        self._greenpool.waitall()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d02f643d","line":59,"updated":"2014-07-05 17:21:58.000000000","message":"This really should have a timeout that declares the maximum time to wait.\n\nhttps://review.openstack.org/#/c/70914/ would benefit from that (and in general timeouts are good).","commit_id":"4e98bce97fa7e23124629fcd352a90a7fae8667b"}],"oslo/messaging/notify/listener.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"185436988d508f5b791f12c40d3c4805790c6f02","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # Wrap dispatcher into proper executor"},{"line_number":130,"context_line":"    mgr \u003d driver.DriverManager(\u0027oslo.messaging.executors\u0027, executor)"},{"line_number":131,"context_line":"    dispatcher \u003d mgr.driver(transport.conf, dispatcher)"},{"line_number":132,"context_line":"    start_thread \u003d executor is not \u0027blocking\u0027"},{"line_number":133,"context_line":"    return msg_server.MessageHandlingServer(transport, targets,"},{"line_number":134,"context_line":"                                            dispatcher, start_thread)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_38750598","line":132,"updated":"2014-07-12 00:34:40.000000000","message":"This almost feels like it should be a attribute of the mgr (or dispatcher?)\n\nFor example:\n\n  start_thread \u003d mgr.requires_thread","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"b1e14eb338212bcb91734c46b877d4d1caeeca3d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # Wrap dispatcher into proper executor"},{"line_number":130,"context_line":"    mgr \u003d driver.DriverManager(\u0027oslo.messaging.executors\u0027, executor)"},{"line_number":131,"context_line":"    dispatcher \u003d mgr.driver(transport.conf, dispatcher)"},{"line_number":132,"context_line":"    start_thread \u003d executor is not \u0027blocking\u0027"},{"line_number":133,"context_line":"    return msg_server.MessageHandlingServer(transport, targets,"},{"line_number":134,"context_line":"                                            dispatcher, start_thread)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_7355dec0","line":132,"in_reply_to":"baada198_38750598","updated":"2014-07-12 02:26:13.000000000","message":"Actually I hope to get rid of this attribute later. It\u0027s mostly a hack for backwards compatibility. IMHO server should start it\u0027s own thread all the time.","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3df9ebe3744eced09caf23bbd8e4517dfffeee19","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # Wrap dispatcher into proper executor"},{"line_number":130,"context_line":"    mgr \u003d driver.DriverManager(\u0027oslo.messaging.executors\u0027, executor)"},{"line_number":131,"context_line":"    dispatcher \u003d mgr.driver(transport.conf, dispatcher)"},{"line_number":132,"context_line":"    start_thread \u003d executor is not \u0027blocking\u0027"},{"line_number":133,"context_line":"    return msg_server.MessageHandlingServer(transport, targets,"},{"line_number":134,"context_line":"                                            dispatcher, start_thread)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_d3e4ea0e","line":132,"in_reply_to":"baada198_7355dec0","updated":"2014-07-12 02:43:21.000000000","message":"Sounds good.","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"}],"oslo/messaging/rpc/dispatcher.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"614a19e48579a436572b03a870288fbaec26af98","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        result \u003d getattr(endpoint, method)(ctxt, **new_args)"},{"line_number":120,"context_line":"        return self.serializer.serialize_entity(ctxt, result)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __call__(self, incoming):"},{"line_number":123,"context_line":"        incoming.acknowledge()"},{"line_number":124,"context_line":"        self._dispatch_and_reply(incoming)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_90f16c97","line":122,"updated":"2014-07-05 18:02:21.000000000","message":"What about splitting this into 3 methods.\n\nFor example:\n\n  pre_dispatch()\n  dispatch()\n  post_dispatch()\n\nThen there isn\u0027t a contextmanager crazyness, there isn\u0027t a implicit __call__ and then users can know exactly what method they should be adding things to...","commit_id":"4e98bce97fa7e23124629fcd352a90a7fae8667b"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d51453ece453c2c2b4a403d3b9464926aa898f39","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        result \u003d getattr(endpoint, method)(ctxt, **new_args)"},{"line_number":120,"context_line":"        return self.serializer.serialize_entity(ctxt, result)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __call__(self, incoming):"},{"line_number":123,"context_line":"        incoming.acknowledge()"},{"line_number":124,"context_line":"        self._dispatch_and_reply(incoming)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7024d80c","line":122,"in_reply_to":"baada198_10355c45","updated":"2014-07-05 18:08:29.000000000","message":"Ok to me.","commit_id":"4e98bce97fa7e23124629fcd352a90a7fae8667b"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"465bac37724a6e5ca94e81948ee7c063d294ce2e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        result \u003d getattr(endpoint, method)(ctxt, **new_args)"},{"line_number":120,"context_line":"        return self.serializer.serialize_entity(ctxt, result)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __call__(self, incoming):"},{"line_number":123,"context_line":"        incoming.acknowledge()"},{"line_number":124,"context_line":"        self._dispatch_and_reply(incoming)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_10355c45","line":122,"in_reply_to":"baada198_90f16c97","updated":"2014-07-05 18:05:24.000000000","message":"In this patch I try to keep the logic the same as we had it before, This patch is going to be quite big (with tests updated). We can change dispatcher logic in the next patch if needed. What do you think?","commit_id":"4e98bce97fa7e23124629fcd352a90a7fae8667b"}],"oslo/messaging/server.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"614a19e48579a436572b03a870288fbaec26af98","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self._running \u003d True"},{"line_number":82,"context_line":"        while self._running:"},{"line_number":83,"context_line":"            self.dispatcher(self._listener.poll())"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def stop(self):"},{"line_number":86,"context_line":"        \"\"\"Stop handling incoming messages."},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_f00aa888","line":84,"updated":"2014-07-05 18:02:21.000000000","message":"Please send a timeout :)","commit_id":"4e98bce97fa7e23124629fcd352a90a7fae8667b"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"185436988d508f5b791f12c40d3c4805790c6f02","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.ex \u003d ex"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class MessageHandlingServer(threading.Thread):"},{"line_number":46,"context_line":"    \"\"\"Server for handling messages."},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ed02f10a","line":45,"updated":"2014-07-12 00:34:40.000000000","message":"Inheriting from thread seems odd here, since this will not always be ran as a thread (start_thread \u003d False). If something can be started without being a thread it feels wrong to have it inherit from threading.Thread.","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3df9ebe3744eced09caf23bbd8e4517dfffeee19","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.ex \u003d ex"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class MessageHandlingServer(threading.Thread):"},{"line_number":46,"context_line":"    \"\"\"Server for handling messages."},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_33bb66e6","line":45,"in_reply_to":"baada198_330606cf","updated":"2014-07-12 02:43:21.000000000","message":"If that damn start_thread attribute goes away then this makes sense (it will always be a thread), but if it can sometimes not be a thread then it doesn\u0027t seem like it should inherit from threading.Thread, if that start_thread is going to be removed anyway then I\u0027m fine with it for now if its a short-term thing anyways.","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"b1e14eb338212bcb91734c46b877d4d1caeeca3d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.ex \u003d ex"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class MessageHandlingServer(threading.Thread):"},{"line_number":46,"context_line":"    \"\"\"Server for handling messages."},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_330606cf","line":45,"in_reply_to":"baada198_ed02f10a","updated":"2014-07-12 02:26:13.000000000","message":"Well this can be discussed. I though it would be nice to inherit from thread since we starting a thread when using eventlet executor. Another reason is that interface of the Server class is very much like a thread (start, run wait/join).","commit_id":"69fc3bb03f0f944f951c889d89cdcc1a028c6dfb"}]}
