)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3e4bda4d2bcba0d93acabea19a9ace68072a558d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"client."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"To protect the concurrency access to the kombu connection between the"},{"line_number":20,"context_line":"driver and this thread use a lock that always prioritarize the"},{"line_number":21,"context_line":"heartbeat thread. So when the heartbeat thread wakup it will acquire the"},{"line_number":22,"context_line":"lock quickly, to ensure we have no heartbeat starvation when the driver"},{"line_number":23,"context_line":"sends a lot of messages."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"da86d52c_b3c33a38","line":20,"updated":"2015-02-16 18:33:00.000000000","message":"s/prioritarize/prioritize/","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"9ea1706e9266db99c0ea82c6c6b2695079f57c0d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"client."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"To protect the concurrency access to the kombu connection between the"},{"line_number":20,"context_line":"driver and this thread use a lock that always prioritarize the"},{"line_number":21,"context_line":"heartbeat thread. So when the heartbeat thread wakup it will acquire the"},{"line_number":22,"context_line":"lock quickly, to ensure we have no heartbeat starvation when the driver"},{"line_number":23,"context_line":"sends a lot of messages."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"ba7be1f8_99f599cd","line":20,"in_reply_to":"da86d52c_b3c33a38","updated":"2015-02-27 16:49:48.000000000","message":"Done","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3e4bda4d2bcba0d93acabea19a9ace68072a558d","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"To protect the concurrency access to the kombu connection between the"},{"line_number":20,"context_line":"driver and this thread use a lock that always prioritarize the"},{"line_number":21,"context_line":"heartbeat thread. So when the heartbeat thread wakup it will acquire the"},{"line_number":22,"context_line":"lock quickly, to ensure we have no heartbeat starvation when the driver"},{"line_number":23,"context_line":"sends a lot of messages."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"da86d52c_53e67ee9","line":21,"updated":"2015-02-16 18:33:00.000000000","message":"s/wakup/wakes up/","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"9ea1706e9266db99c0ea82c6c6b2695079f57c0d","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"To protect the concurrency access to the kombu connection between the"},{"line_number":20,"context_line":"driver and this thread use a lock that always prioritarize the"},{"line_number":21,"context_line":"heartbeat thread. So when the heartbeat thread wakup it will acquire the"},{"line_number":22,"context_line":"lock quickly, to ensure we have no heartbeat starvation when the driver"},{"line_number":23,"context_line":"sends a lot of messages."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"ba7be1f8_d9ff11a9","line":21,"in_reply_to":"da86d52c_53e67ee9","updated":"2015-02-27 16:49:48.000000000","message":"Done","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3e4bda4d2bcba0d93acabea19a9ace68072a558d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"lock quickly, to ensure we have no heartbeat starvation when the driver"},{"line_number":23,"context_line":"sends a lot of messages."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Also when we are polling the broker, the lock can be hold for a long"},{"line_number":26,"context_line":"time by the \u0027consume\u0027 method, so this one does the heartbeat stuffs itself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Oleksii Zamiatin \u003cozamiatin@mirantis.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"da86d52c_73e9c2b6","line":25,"updated":"2015-02-16 18:33:00.000000000","message":"s/hold/held/","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"9ea1706e9266db99c0ea82c6c6b2695079f57c0d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"lock quickly, to ensure we have no heartbeat starvation when the driver"},{"line_number":23,"context_line":"sends a lot of messages."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Also when we are polling the broker, the lock can be hold for a long"},{"line_number":26,"context_line":"time by the \u0027consume\u0027 method, so this one does the heartbeat stuffs itself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Oleksii Zamiatin \u003cozamiatin@mirantis.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"ba7be1f8_f92bf530","line":25,"in_reply_to":"da86d52c_73e9c2b6","updated":"2015-02-27 16:49:48.000000000","message":"Done","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"}],"oslo_messaging/_drivers/amqp.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"cc698abab06d59c56472fdbc597831de27146b38","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"UNIQUE_ID \u003d \u0027_unique_id\u0027"},{"line_number":56,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":57,"context_line":"PURPOSE_LISTEN \u003d \u0027listen\u0027"},{"line_number":58,"context_line":"PURPOSE_SEND \u003d \u0027send\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_15663651","line":57,"updated":"2015-03-04 00:29:02.000000000","message":"These almost seem like they deserve comments; as there intended meaning is not that obvious. What do u think? There naming mostly hints at what they do, but its not that clear... It does appear there is implications that should be documented so that others know what side-effects choosing listen vs send have...","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"UNIQUE_ID \u003d \u0027_unique_id\u0027"},{"line_number":56,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":57,"context_line":"PURPOSE_LISTEN \u003d \u0027listen\u0027"},{"line_number":58,"context_line":"PURPOSE_SEND \u003d \u0027send\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_4212bc09","line":57,"in_reply_to":"ba7be1f8_15663651","updated":"2015-03-09 10:36:05.000000000","message":"I have added some docs","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"2c76ffcbe354242e8415c1cc9452a8aa1978228f","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    # TODO(comstud): Timeout connections not used in a while"},{"line_number":89,"context_line":"    def create(self, purpose\u003dNone):"},{"line_number":90,"context_line":"        if not purpose:"},{"line_number":91,"context_line":"            purpose \u003d PURPOSE_SEND"},{"line_number":92,"context_line":"        LOG.debug(\u0027Pool creating new connection\u0027)"},{"line_number":93,"context_line":"        return self.connection_cls(self.conf, self.url, purpose)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_b132200e","line":90,"updated":"2015-03-12 20:56:37.000000000","message":"Just FYI, PEP8 recommends (but does not require) always using \u0027if purpose is None\u0027 in this situation. There is a very real situation that purpose could be passed accidentally as a value that evaluates to bool(False). #notaminusone","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"cc224e4cb473fcd9cb01963e33731f0b8644c8f1","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    # TODO(comstud): Timeout connections not used in a while"},{"line_number":89,"context_line":"    def create(self, purpose\u003dNone):"},{"line_number":90,"context_line":"        if not purpose:"},{"line_number":91,"context_line":"            purpose \u003d PURPOSE_SEND"},{"line_number":92,"context_line":"        LOG.debug(\u0027Pool creating new connection\u0027)"},{"line_number":93,"context_line":"        return self.connection_cls(self.conf, self.url, purpose)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_0f8b69c3","line":90,"in_reply_to":"9a80dd14_b132200e","updated":"2015-03-16 08:42:16.000000000","message":"Done","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"}],"oslo_messaging/_drivers/impl_rabbit.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f669e373a2de913b605f7152e6f1532603c9fad8","unresolved":false,"context_lines":[{"line_number":823,"context_line":"            # (heatbeat_timeout/heartbeat_rate/2.0, default kombu"},{"line_number":824,"context_line":"            # heartbeat_rate is 2)"},{"line_number":825,"context_line":"            self._heartbeat_exit_event.wait("},{"line_number":826,"context_line":"                timeout\u003dself.conf.heartbeat_timeout / 4.0)"},{"line_number":827,"context_line":"        self._heartbeat_exit_event.clear()"},{"line_number":828,"context_line":""},{"line_number":829,"context_line":"    def declare_consumer(self, consumer_cls, topic, callback):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa81d914_d44a6f82","line":826,"updated":"2015-01-28 19:45:09.000000000","message":"shouldn\u0027t heartbeat rate be configurable too, like you\u0027ve did with  heartbeat timeout?","commit_id":"d26415a05fa490ed254f9a067b0d17524ceb9643"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3e4bda4d2bcba0d93acabea19a9ace68072a558d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                     \u0027RabbitMQ database.\u0027),"},{"line_number":123,"context_line":"    cfg.IntOpt(\u0027heartbeat_timeout\u0027,"},{"line_number":124,"context_line":"               default\u003d60,"},{"line_number":125,"context_line":"               help\u003d\u0027seconds between rabbit keep-alive heartbeat.\u0027),"},{"line_number":126,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":127,"context_line":"               default\u003d2,"},{"line_number":128,"context_line":"               help\u003d\u0027How often times during the heartbeat timeout we check \u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"da86d52c_0ec69916","line":125,"updated":"2015-02-16 18:33:00.000000000","message":"This help string could use a bit of improvement. The above makes it sound like the option is the number of seconds between heartbeats, when in fact it is the amount of time to tolerate not being able to contact the broker in the heartbeat thread.\n\nHow about \"heartbeat_down_seconds\" and a help string of \"Amount of seconds after which the Rabbit broker is considered down if heartbeat\u0027s keep-alive fails.\"","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"9ea1706e9266db99c0ea82c6c6b2695079f57c0d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                     \u0027RabbitMQ database.\u0027),"},{"line_number":123,"context_line":"    cfg.IntOpt(\u0027heartbeat_timeout\u0027,"},{"line_number":124,"context_line":"               default\u003d60,"},{"line_number":125,"context_line":"               help\u003d\u0027seconds between rabbit keep-alive heartbeat.\u0027),"},{"line_number":126,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":127,"context_line":"               default\u003d2,"},{"line_number":128,"context_line":"               help\u003d\u0027How often times during the heartbeat timeout we check \u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_99cd9960","line":125,"in_reply_to":"da86d52c_0ec69916","updated":"2015-02-27 16:49:48.000000000","message":"Done","commit_id":"e04edc66cd8e6997d146b501e993d48f344940ac"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"75bdf3cb0729afc635de0c697d247dc653df6316","unresolved":false,"context_lines":[{"line_number":126,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"},{"line_number":127,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":128,"context_line":"               default\u003d2,"},{"line_number":129,"context_line":"               help\u003d\u0027How often times during the heartbeat_down_seconds we \u0027"},{"line_number":130,"context_line":"               \u0027check the heartbeat.\u0027),"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    # NOTE(sileht): deprecated option since oslo_messaging 1.5.0,"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_982d2fab","line":129,"updated":"2015-03-06 17:35:05.000000000","message":"For the default of 60 seconds, does this mean we check 2 times (around every 30 seconds or so) or does it mean we check every 2 seconds?","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":126,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"},{"line_number":127,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":128,"context_line":"               default\u003d2,"},{"line_number":129,"context_line":"               help\u003d\u0027How often times during the heartbeat_down_seconds we \u0027"},{"line_number":130,"context_line":"               \u0027check the heartbeat.\u0027),"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    # NOTE(sileht): deprecated option since oslo_messaging 1.5.0,"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_62e0a029","line":129,"in_reply_to":"9a80dd14_982d2fab","updated":"2015-03-09 10:36:05.000000000","message":"2 checks, around every 30 seconds","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"c7063ce002d488a1a0694e13c7487f5ca5804da0","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class ConnectionLock(DummyConnectionLock):"},{"line_number":487,"context_line":"    \"\"\"The heartbeat lock always have the priority."},{"line_number":488,"context_line":"    \"\"\""},{"line_number":489,"context_line":"    def __init__(self):"},{"line_number":490,"context_line":"        self._workers_waiting \u003d 0"},{"line_number":491,"context_line":"        self._heartbeat_waiting \u003d False"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_955b0653","line":488,"updated":"2015-03-04 00:40:48.000000000","message":"I\u0027m thinking some better docs would help here. The docstring isn\u0027t all that useful in easily figuring out what this does ;)","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class ConnectionLock(DummyConnectionLock):"},{"line_number":487,"context_line":"    \"\"\"The heartbeat lock always have the priority."},{"line_number":488,"context_line":"    \"\"\""},{"line_number":489,"context_line":"    def __init__(self):"},{"line_number":490,"context_line":"        self._workers_waiting \u003d 0"},{"line_number":491,"context_line":"        self._heartbeat_waiting \u003d False"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_535a8c2a","line":488,"in_reply_to":"ba7be1f8_955b0653","updated":"2015-03-09 10:36:05.000000000","message":"Done","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2f7cc833a2dabc200ff7f68296b4d2a3035fb572","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        self._heartbeat_lock \u003d threading.Condition(self._monitor)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def acquire(self):"},{"line_number":498,"context_line":"        self._monitor.acquire()"},{"line_number":499,"context_line":"        while self._lock_acquired:"},{"line_number":500,"context_line":"            self._workers_waiting +\u003d 1"},{"line_number":501,"context_line":"            self._workers_locks.wait()"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_c93ee38a","line":498,"updated":"2015-03-03 16:28:30.000000000","message":"So only question; why not use the following:\n\n with self._monitor:\n     \u003cdo stuff\u003e\n\n?","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        self._heartbeat_lock \u003d threading.Condition(self._monitor)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def acquire(self):"},{"line_number":498,"context_line":"        self._monitor.acquire()"},{"line_number":499,"context_line":"        while self._lock_acquired:"},{"line_number":500,"context_line":"            self._workers_waiting +\u003d 1"},{"line_number":501,"context_line":"            self._workers_locks.wait()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_c24f8c32","line":498,"in_reply_to":"9a80dd14_6315303f","updated":"2015-03-09 10:36:05.000000000","message":"Done","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"75bdf3cb0729afc635de0c697d247dc653df6316","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        self._heartbeat_lock \u003d threading.Condition(self._monitor)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def acquire(self):"},{"line_number":498,"context_line":"        self._monitor.acquire()"},{"line_number":499,"context_line":"        while self._lock_acquired:"},{"line_number":500,"context_line":"            self._workers_waiting +\u003d 1"},{"line_number":501,"context_line":"            self._workers_locks.wait()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_6315303f","line":498,"in_reply_to":"ba7be1f8_c93ee38a","updated":"2015-03-06 17:35:05.000000000","message":"Yes, this looks like an opportunity for an exception to cause us to fail to release the monitor lock.","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"c7063ce002d488a1a0694e13c7487f5ca5804da0","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            self._workers_waiting +\u003d 1"},{"line_number":501,"context_line":"            self._workers_locks.wait()"},{"line_number":502,"context_line":"            self._workers_waiting -\u003d 1"},{"line_number":503,"context_line":"        self._lock_acquired \u003d True"},{"line_number":504,"context_line":"        self._monitor.release()"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def heartbeat_acquire(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_c71b1571","line":503,"updated":"2015-03-04 00:40:48.000000000","message":"Should this be thread.get_ident() instead of True (and then reset it to None); that way u can check who is doing the release (instead of allowing it to be any thread, the thread who acquired, or others...)\n\nPerhaps have similar code to:\n\nhttps://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/lockutils.py#L513\n\nThen use that instead of true/false...","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            self._workers_waiting +\u003d 1"},{"line_number":501,"context_line":"            self._workers_locks.wait()"},{"line_number":502,"context_line":"            self._workers_waiting -\u003d 1"},{"line_number":503,"context_line":"        self._lock_acquired \u003d True"},{"line_number":504,"context_line":"        self._monitor.release()"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def heartbeat_acquire(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_85e59e0a","line":503,"in_reply_to":"ba7be1f8_c71b1571","updated":"2015-03-09 10:36:05.000000000","message":"Looks a good additional protection, I have done it, but I can only raise RuntimeError in this case.","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"75bdf3cb0729afc635de0c697d247dc653df6316","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def heartbeat_acquire(self):"},{"line_number":507,"context_line":"        # NOTE(sileht): must be called only one time"},{"line_number":508,"context_line":"        self._monitor.acquire()"},{"line_number":509,"context_line":"        while self._lock_acquired:"},{"line_number":510,"context_line":"            self._heartbeat_waiting \u003d True"},{"line_number":511,"context_line":"            self._heartbeat_lock.wait()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_435bcc2d","line":508,"updated":"2015-03-06 17:35:05.000000000","message":"Same comment on use of the lock as a context manager.","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def heartbeat_acquire(self):"},{"line_number":507,"context_line":"        # NOTE(sileht): must be called only one time"},{"line_number":508,"context_line":"        self._monitor.acquire()"},{"line_number":509,"context_line":"        while self._lock_acquired:"},{"line_number":510,"context_line":"            self._heartbeat_waiting \u003d True"},{"line_number":511,"context_line":"            self._heartbeat_lock.wait()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_62750063","line":508,"in_reply_to":"9a80dd14_435bcc2d","updated":"2015-03-09 10:36:05.000000000","message":"Done","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"75bdf3cb0729afc635de0c697d247dc653df6316","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        self._monitor.release()"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"    def release(self):"},{"line_number":517,"context_line":"        self._monitor.acquire()"},{"line_number":518,"context_line":"        self._lock_acquired \u003d False"},{"line_number":519,"context_line":"        if self._heartbeat_waiting:"},{"line_number":520,"context_line":"            self._heartbeat_lock.notify()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_e3d2005b","line":517,"updated":"2015-03-06 17:35:05.000000000","message":"Again.","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        self._monitor.release()"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"    def release(self):"},{"line_number":517,"context_line":"        self._monitor.acquire()"},{"line_number":518,"context_line":"        self._lock_acquired \u003d False"},{"line_number":519,"context_line":"        if self._heartbeat_waiting:"},{"line_number":520,"context_line":"            self._heartbeat_lock.notify()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_82703473","line":517,"in_reply_to":"9a80dd14_e3d2005b","updated":"2015-03-09 10:36:05.000000000","message":"Done","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"c7063ce002d488a1a0694e13c7487f5ca5804da0","unresolved":false,"context_lines":[{"line_number":832,"context_line":"    def _heartbeat_thread_job(self):"},{"line_number":833,"context_line":"        \"\"\"Maintain inactive connections"},{"line_number":834,"context_line":"        \"\"\""},{"line_number":835,"context_line":"        while not self._heartbeat_exit_event.is_set():"},{"line_number":836,"context_line":"            self._connection_lock.heartbeat_acquire()"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"            recoverable_errors \u003d ("}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_a73e21b6","line":835,"updated":"2015-03-04 00:40:48.000000000","message":"Should heartbeat_acquire be some sort of context manager for safety (that acquires, yields, releases)??","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":832,"context_line":"    def _heartbeat_thread_job(self):"},{"line_number":833,"context_line":"        \"\"\"Maintain inactive connections"},{"line_number":834,"context_line":"        \"\"\""},{"line_number":835,"context_line":"        while not self._heartbeat_exit_event.is_set():"},{"line_number":836,"context_line":"            self._connection_lock.heartbeat_acquire()"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"            recoverable_errors \u003d ("}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_c5beb6ad","line":835,"in_reply_to":"ba7be1f8_a73e21b6","updated":"2015-03-09 10:36:05.000000000","message":"That the next try..finally does. But I have created a helper in ConnectionLock to use context manager and make the code clearer.","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"c7063ce002d488a1a0694e13c7487f5ca5804da0","unresolved":false,"context_lines":[{"line_number":867,"context_line":"            # (heatbeat_timeout/heartbeat_rate/2.0, default kombu"},{"line_number":868,"context_line":"            # heartbeat_rate is 2)"},{"line_number":869,"context_line":"            self._heartbeat_exit_event.wait("},{"line_number":870,"context_line":"                timeout\u003d(float(self.driver_conf.heartbeat_down_seconds) /"},{"line_number":871,"context_line":"                         float(self.driver_conf.heartbeat_rate) / 2.0))"},{"line_number":872,"context_line":"        self._heartbeat_exit_event.clear()"},{"line_number":873,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_a7ac61ee","line":870,"updated":"2015-03-04 00:40:48.000000000","message":"Why not just do this calculation once and save it somewhere in a variable? In __init__ or at the top of this function? ...","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"01e139d00ddbb654c3fe9d66b9fb18edf8af9511","unresolved":false,"context_lines":[{"line_number":867,"context_line":"            # (heatbeat_timeout/heartbeat_rate/2.0, default kombu"},{"line_number":868,"context_line":"            # heartbeat_rate is 2)"},{"line_number":869,"context_line":"            self._heartbeat_exit_event.wait("},{"line_number":870,"context_line":"                timeout\u003d(float(self.driver_conf.heartbeat_down_seconds) /"},{"line_number":871,"context_line":"                         float(self.driver_conf.heartbeat_rate) / 2.0))"},{"line_number":872,"context_line":"        self._heartbeat_exit_event.clear()"},{"line_number":873,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_45b726f5","line":870,"in_reply_to":"ba7be1f8_a7ac61ee","updated":"2015-03-09 10:36:05.000000000","message":"Done","commit_id":"59434dfc102bc11b4826123d6e9cfc8251bc0550"},{"author":{"_account_id":7227,"name":"Timur Nurlygayanov","email":"tnurlygayanov@mirantis.com","username":"tnurlygayanov"},"change_message_id":"251823e7f3d191fe22ce117cfffed82be0daf255","unresolved":false,"context_lines":[{"line_number":489,"context_line":"class ConnectionLock(DummyConnectionLock):"},{"line_number":490,"context_line":"    \"\"\"Lock object to protect access the the kombu connection"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    This is a lock object to protect access the the kombu connection"},{"line_number":493,"context_line":"    object between the heartbeat thread and the driver thread."},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    They are two way to acquire this lock:"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_f50a641e","line":492,"updated":"2015-03-16 08:09:27.000000000","message":"typo error: \u0027the the\u0027","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"185215877a4cb65cc7f9f075fc5e3ad8f9fb438b","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    \"\"\"Lock object to protect access the the kombu connection"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    This is a lock object to protect access the the kombu connection"},{"line_number":493,"context_line":"    object between the heartbeat thread and the driver thread."},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    They are two way to acquire this lock:"},{"line_number":496,"context_line":"        * lock.acquire()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_ec387a3f","line":493,"updated":"2015-03-11 20:29:33.000000000","message":"I am far from a kombu expert - but it seems to me that this could easily be avoided by having a separate channel for the hearbeat and other threads.\n\nActually after reading the AMQPDriverBase, impl_rabbit.Connection, and amqp.ConnectionPool code, I think we are approaching connection pooling the wrong way... instead of pooling connections with one channel each where we multiplex several consumers or just have one thread sending - we should be really pooling on channels of a single connection.\n\nNot -1ing since I could be totally wrong on this one though.","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"4985f20bbc50709cce71a701b11af917e4bb8893","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    \"\"\"Lock object to protect access the the kombu connection"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    This is a lock object to protect access the the kombu connection"},{"line_number":493,"context_line":"    object between the heartbeat thread and the driver thread."},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    They are two way to acquire this lock:"},{"line_number":496,"context_line":"        * lock.acquire()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_3ac5323d","line":493,"in_reply_to":"9a80dd14_ec387a3f","updated":"2015-03-12 17:16:50.000000000","message":"As I said on IRC, I agree that having only one connection in the driver and multiple channels will be a good improvement, but this is a real big change...\n\nOther side effect of that is that we will not share code anymore with the qpid driver, but that not a big deal.\n\nI wonder if we shouldn\u0027t create a new kombu driver (compatible with the old one) to not keep the crap of that one. Perhaps something to do for Liberty","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d6bbd26c163782a283c370869e892a36963a400c","unresolved":false,"context_lines":[{"line_number":883,"context_line":"            self._heartbeat_exit_event \u003d threading.Event()"},{"line_number":884,"context_line":"            self._heartbeat_thread \u003d threading.Thread("},{"line_number":885,"context_line":"                target\u003dself._heartbeat_thread_job)"},{"line_number":886,"context_line":"            self._heartbeat_thread.daemon \u003d True"},{"line_number":887,"context_line":"            self._heartbeat_thread.start()"},{"line_number":888,"context_line":"        else:"},{"line_number":889,"context_line":"            self._heartbeat_thread \u003d None"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_94378ae2","line":886,"updated":"2015-03-13 23:49:12.000000000","message":"Seems like u should also check the following right?\n\n  \u003e\u003e\u003e c \u003d kombu.Connection(\u0027amqp://guest:XYZ@localhost//\u0027)\n  \u003e\u003e\u003e c.supports_heartbeats\n  \u003e\u003e\u003e True\n\nIf that returns false, log a info message/warning telling operators that even though they have requested heartbeat to be enabled, its not actually going to be...\n\nBecause as https://github.com/celery/kombu/blob/master/kombu/connection.py#L249 says the heartbeat_check() can just be a no-op in this case, and imho its better to warn people that a thread is begin created that will do nothing ;)","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"cc224e4cb473fcd9cb01963e33731f0b8644c8f1","unresolved":false,"context_lines":[{"line_number":883,"context_line":"            self._heartbeat_exit_event \u003d threading.Event()"},{"line_number":884,"context_line":"            self._heartbeat_thread \u003d threading.Thread("},{"line_number":885,"context_line":"                target\u003dself._heartbeat_thread_job)"},{"line_number":886,"context_line":"            self._heartbeat_thread.daemon \u003d True"},{"line_number":887,"context_line":"            self._heartbeat_thread.start()"},{"line_number":888,"context_line":"        else:"},{"line_number":889,"context_line":"            self._heartbeat_thread \u003d None"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_10438642","line":886,"in_reply_to":"9a80dd14_94378ae2","updated":"2015-03-16 08:42:16.000000000","message":"I have added  a warn, and I don\u0027t start the thread anymore if that not needed.","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"71806879524749551a668656b000d9416f674800","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":922,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":923,"context_line":"                    self.ensure_connection()"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"            self._heartbeat_exit_event.wait("},{"line_number":926,"context_line":"                timeout\u003dself._heartbeat_wait_timeout)"},{"line_number":927,"context_line":"        self._heartbeat_exit_event.clear()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_6ea5e7a0","line":924,"updated":"2015-03-13 22:54:53.000000000","message":"Should this exit gracefully on non_recoverable_errors; from my read the \u0027self._heartbeat_exit_event.clear()\u0027 will never be called if something other than \u0027recoverable_errors\u0027 is thrown (by someone). Is that ok?","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"cc224e4cb473fcd9cb01963e33731f0b8644c8f1","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":922,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":923,"context_line":"                    self.ensure_connection()"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"            self._heartbeat_exit_event.wait("},{"line_number":926,"context_line":"                timeout\u003dself._heartbeat_wait_timeout)"},{"line_number":927,"context_line":"        self._heartbeat_exit_event.clear()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_4a32aff2","line":924,"in_reply_to":"9a80dd14_6ea5e7a0","updated":"2015-03-16 08:42:16.000000000","message":"Done, I have logged the exception and retry, just is case, but If something wrong occurs here, we have a good chance that is a bug in oslo.msg, kombu or py-amqp.","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"71806879524749551a668656b000d9416f674800","unresolved":false,"context_lines":[{"line_number":982,"context_line":""},{"line_number":983,"context_line":"                if (self.driver_conf.heartbeat_down_seconds"},{"line_number":984,"context_line":"                        and self.driver_conf.heartbeat_down_seconds \u003e 0):"},{"line_number":985,"context_line":"                    self.connection.heartbeat_check("},{"line_number":986,"context_line":"                        rate\u003dself.driver_conf.heartbeat_rate)"},{"line_number":987,"context_line":"                try:"},{"line_number":988,"context_line":"                    return self.connection.drain_events(timeout\u003dpoll_timeout)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_2eaf6f7e","line":985,"updated":"2015-03-13 22:54:53.000000000","message":"Is this supposed to be in a try, catch block like in the thread above, if so maybe a helper method to do that (and both this code and that code share it) then?","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"cc224e4cb473fcd9cb01963e33731f0b8644c8f1","unresolved":false,"context_lines":[{"line_number":982,"context_line":""},{"line_number":983,"context_line":"                if (self.driver_conf.heartbeat_down_seconds"},{"line_number":984,"context_line":"                        and self.driver_conf.heartbeat_down_seconds \u003e 0):"},{"line_number":985,"context_line":"                    self.connection.heartbeat_check("},{"line_number":986,"context_line":"                        rate\u003dself.driver_conf.heartbeat_rate)"},{"line_number":987,"context_line":"                try:"},{"line_number":988,"context_line":"                    return self.connection.drain_events(timeout\u003dpoll_timeout)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a80dd14_2d312c5a","line":985,"in_reply_to":"9a80dd14_2eaf6f7e","updated":"2015-03-16 08:42:16.000000000","message":"We don\u0027t need try..catch here, because the \u0027_consume\u0027 method is called by the kombu autoretry method that will call the \u0027_error_callback\u0027 if something go wrong","commit_id":"3a91c447695e4bfe0169ce33ec4cc103bfc4faea"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"305ba46caf6fcfc298afdf9853f81c38858d40a7","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                help\u003d\u0027Use HA queues in RabbitMQ (x-ha-policy: all). \u0027"},{"line_number":123,"context_line":"                     \u0027If you change this option, you must wipe the \u0027"},{"line_number":124,"context_line":"                     \u0027RabbitMQ database.\u0027),"},{"line_number":125,"context_line":"    cfg.IntOpt(\u0027heartbeat_down_seconds\u0027,"},{"line_number":126,"context_line":"               default\u003d60,"},{"line_number":127,"context_line":"               help\u003d\"Amount of seconds after which the Rabbit broker is \""},{"line_number":128,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_69ae7c83","line":125,"updated":"2015-03-16 21:04:12.000000000","message":"We seem to have a rough convention of including \"threshold\" in the name of options like this to indicate that crossing the boundary represents a change of state. So how about \"heartbeat_timeout_threshold\" as an alternate name?","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f47f08d47b8bd00c61ef7ff5b09ef6f8a0be6cff","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                help\u003d\u0027Use HA queues in RabbitMQ (x-ha-policy: all). \u0027"},{"line_number":123,"context_line":"                     \u0027If you change this option, you must wipe the \u0027"},{"line_number":124,"context_line":"                     \u0027RabbitMQ database.\u0027),"},{"line_number":125,"context_line":"    cfg.IntOpt(\u0027heartbeat_down_seconds\u0027,"},{"line_number":126,"context_line":"               default\u003d60,"},{"line_number":127,"context_line":"               help\u003d\"Amount of seconds after which the Rabbit broker is \""},{"line_number":128,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_fed9ee22","line":125,"in_reply_to":"9a80dd14_69ae7c83","updated":"2015-03-18 09:13:49.000000000","message":"Done","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"305ba46caf6fcfc298afdf9853f81c38858d40a7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                     \u0027RabbitMQ database.\u0027),"},{"line_number":125,"context_line":"    cfg.IntOpt(\u0027heartbeat_down_seconds\u0027,"},{"line_number":126,"context_line":"               default\u003d60,"},{"line_number":127,"context_line":"               help\u003d\"Amount of seconds after which the Rabbit broker is \""},{"line_number":128,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"},{"line_number":129,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":130,"context_line":"               default\u003d2,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_c9c4c843","line":127,"updated":"2015-03-16 21:04:12.000000000","message":"s/Amount/Number/","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f47f08d47b8bd00c61ef7ff5b09ef6f8a0be6cff","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                     \u0027RabbitMQ database.\u0027),"},{"line_number":125,"context_line":"    cfg.IntOpt(\u0027heartbeat_down_seconds\u0027,"},{"line_number":126,"context_line":"               default\u003d60,"},{"line_number":127,"context_line":"               help\u003d\"Amount of seconds after which the Rabbit broker is \""},{"line_number":128,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"},{"line_number":129,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":130,"context_line":"               default\u003d2,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_5e067a86","line":127,"in_reply_to":"9a80dd14_c9c4c843","updated":"2015-03-18 09:13:49.000000000","message":"Done","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4277cb6eb5cf2a92bbf61d980133e6340aa25bee","unresolved":false,"context_lines":[{"line_number":128,"context_line":"               \"considered down if heartbeat\u0027s keep-alive fails.\"),"},{"line_number":129,"context_line":"    cfg.IntOpt(\u0027heartbeat_rate\u0027,"},{"line_number":130,"context_line":"               default\u003d2,"},{"line_number":131,"context_line":"               help\u003d\u0027How often times during the heartbeat_down_seconds we \u0027"},{"line_number":132,"context_line":"               \u0027check the heartbeat.\u0027),"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    # NOTE(sileht): deprecated option since oslo_messaging 1.5.0,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_17b3290b","line":131,"updated":"2015-03-17 17:06:55.000000000","message":"the description is a bit confusing, and the option name is confusing as well.\nwhy not this option be in seconds and previous on is \u0027heartbeat_timeout\u0027?\n\nI guess it\u0027s connected to how it is used to be in underlying libraries, but for a new reader, seconds make much more sense.\n\nSo, currently it\u0027s proposed to check heartbeats 4 times in 60 seconds (accroding to L676), while I see a suggestion (in amqp library) to check heartbeats once in a second or two.\nAm I missing anything?","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b322d20f9fcec5100a4ee18b2e8a7353ad815053","unresolved":false,"context_lines":[{"line_number":558,"context_line":"            self.release()"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    @staticmethod"},{"line_number":561,"context_line":"    def _fetch_current_thread_functor():"},{"line_number":562,"context_line":"        # Until https://github.com/eventlet/eventlet/issues/172 is resolved"},{"line_number":563,"context_line":"        # or addressed we have to use complicated workaround to get a object"},{"line_number":564,"context_line":"        # that will not be recycled; the usage of threading.current_thread()"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_8aff3065","line":561,"updated":"2015-03-16 16:12:37.000000000","message":"Hmmm, let me move this to oslo.utils, note to self :-P","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"305ba46caf6fcfc298afdf9853f81c38858d40a7","unresolved":false,"context_lines":[{"line_number":558,"context_line":"            self.release()"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    @staticmethod"},{"line_number":561,"context_line":"    def _fetch_current_thread_functor():"},{"line_number":562,"context_line":"        # Until https://github.com/eventlet/eventlet/issues/172 is resolved"},{"line_number":563,"context_line":"        # or addressed we have to use complicated workaround to get a object"},{"line_number":564,"context_line":"        # that will not be recycled; the usage of threading.current_thread()"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_c983e8a7","line":561,"in_reply_to":"9a80dd14_8aff3065","updated":"2015-03-16 21:04:12.000000000","message":"Or oslo.concurrency :-)","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"f66ae646251c5568357f6463be3a9a4f91302af8","unresolved":false,"context_lines":[{"line_number":558,"context_line":"            self.release()"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    @staticmethod"},{"line_number":561,"context_line":"    def _fetch_current_thread_functor():"},{"line_number":562,"context_line":"        # Until https://github.com/eventlet/eventlet/issues/172 is resolved"},{"line_number":563,"context_line":"        # or addressed we have to use complicated workaround to get a object"},{"line_number":564,"context_line":"        # that will not be recycled; the usage of threading.current_thread()"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_b9aefd96","line":561,"in_reply_to":"9a80dd14_c983e8a7","updated":"2015-03-16 22:31:05.000000000","message":"Except oslo.concurrency is bound to oslo.config; and therefore makes the inclusion of this function into that heavyweight; since now any consuming project needs to pull in a bunch of extra dependencies that aren\u0027t needed by consuming projects. Oslo.utils doesn\u0027t do this, and imho is more lightweight on dependencies... If oslo.concurrency wasn\u0027t so heavyweight, then sure...\n\nhttps://review.openstack.org/#/c/164771/ up anyway...","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4277cb6eb5cf2a92bbf61d980133e6340aa25bee","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                    # connection"},{"line_number":929,"context_line":"                    try:"},{"line_number":930,"context_line":"                        self.connection.drain_events(timeout\u003d0.001)"},{"line_number":931,"context_line":"                    except socket.timeout:"},{"line_number":932,"context_line":"                        pass"},{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_b715fde6","line":931,"updated":"2015-03-17 17:06:55.000000000","message":"why are we skipping this exception?","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f47f08d47b8bd00c61ef7ff5b09ef6f8a0be6cff","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                    # connection"},{"line_number":929,"context_line":"                    try:"},{"line_number":930,"context_line":"                        self.connection.drain_events(timeout\u003d0.001)"},{"line_number":931,"context_line":"                    except socket.timeout:"},{"line_number":932,"context_line":"                        pass"},{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_5ec91a24","line":931,"in_reply_to":"9a80dd14_b715fde6","updated":"2015-03-18 09:13:49.000000000","message":"I use timeout to not hold the connection too much times.\nAnd socket.timeout doesn\u0027t need to reconnection to rabbit that why I skip this error.","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"305ba46caf6fcfc298afdf9853f81c38858d40a7","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                    except socket.timeout:"},{"line_number":932,"context_line":"                        pass"},{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":935,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":936,"context_line":"                    self.ensure_connection()"},{"line_number":937,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_046087ce","line":934,"updated":"2015-03-16 21:04:12.000000000","message":"If the error is recoverable, do we need to tell anyone about it?","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f47f08d47b8bd00c61ef7ff5b09ef6f8a0be6cff","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                    except socket.timeout:"},{"line_number":932,"context_line":"                        pass"},{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":935,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":936,"context_line":"                    self.ensure_connection()"},{"line_number":937,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_3e9466e7","line":934,"in_reply_to":"9a80dd14_046087ce","updated":"2015-03-18 09:13:49.000000000","message":"I have removed the backtrace, but we need to inform the operator that we lost the connection to rabbit.","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4277cb6eb5cf2a92bbf61d980133e6340aa25bee","unresolved":false,"context_lines":[{"line_number":932,"context_line":"                        pass"},{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":935,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":936,"context_line":"                    self.ensure_connection()"},{"line_number":937,"context_line":"                except Exception:"},{"line_number":938,"context_line":"                    LOG.exception(_LE(\"Unexpected error during heartbeart, \""}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_b467bbb6","line":935,"updated":"2015-03-17 17:06:55.000000000","message":"grammar nit: errors occur (or error occurs)","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f47f08d47b8bd00c61ef7ff5b09ef6f8a0be6cff","unresolved":false,"context_lines":[{"line_number":932,"context_line":"                        pass"},{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":935,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":936,"context_line":"                    self.ensure_connection()"},{"line_number":937,"context_line":"                except Exception:"},{"line_number":938,"context_line":"                    LOG.exception(_LE(\"Unexpected error during heartbeart, \""}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_de1fcab6","line":935,"in_reply_to":"9a80dd14_b467bbb6","updated":"2015-03-18 09:13:49.000000000","message":"Done","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"305ba46caf6fcfc298afdf9853f81c38858d40a7","unresolved":false,"context_lines":[{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":935,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":936,"context_line":"                    self.ensure_connection()"},{"line_number":937,"context_line":"                except Exception:"},{"line_number":938,"context_line":"                    LOG.exception(_LE(\"Unexpected error during heartbeart, \""},{"line_number":939,"context_line":"                                      \"retrying...\"))"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_c41d8f12","line":936,"updated":"2015-03-16 21:04:12.000000000","message":"If an exception happens in ensure_connection(), we\u0027ll be thrown out of the current block without logging here. Is that the intent? There are a lot of nested try/except blocks here so I hate suggesting that we add another, but I think we need it for safety.","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f47f08d47b8bd00c61ef7ff5b09ef6f8a0be6cff","unresolved":false,"context_lines":[{"line_number":933,"context_line":"                except recoverable_errors:"},{"line_number":934,"context_line":"                    LOG.info(_LI(\"A recoverable connection/channel errors \""},{"line_number":935,"context_line":"                                 \"occurs, try to reconnect.\"), exc_info\u003dTrue)"},{"line_number":936,"context_line":"                    self.ensure_connection()"},{"line_number":937,"context_line":"                except Exception:"},{"line_number":938,"context_line":"                    LOG.exception(_LE(\"Unexpected error during heartbeart, \""},{"line_number":939,"context_line":"                                      \"retrying...\"))"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_7ee7beac","line":936,"in_reply_to":"9a80dd14_c41d8f12","updated":"2015-03-18 09:13:49.000000000","message":"I have added the safety, it\u0027s always better but if something go wrong here, we have a strong chance that is a software bug.","commit_id":"2be838d3c9822a114c0282158ede2a1fba867699"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"53b70db7ddba0d07e73834268dc0180408244f2f","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                            pass"},{"line_number":935,"context_line":"                    except recoverable_errors as exc:"},{"line_number":936,"context_line":"                        LOG.info(_LI(\"A recoverable connection/channel error \""},{"line_number":937,"context_line":"                                     \"occurs, try to reconnect: %s\"), exc)"},{"line_number":938,"context_line":"                except Exception:"},{"line_number":939,"context_line":"                    LOG.exception(_LE(\"Unexpected error during heartbeart \""},{"line_number":940,"context_line":"                                      \"thread processing, retrying...\"))"}],"source_content_type":"text/x-python","patch_set":33,"id":"9a80dd14_9ea9c026","line":937,"updated":"2015-03-18 15:34:28.000000000","message":"I submitted a follow-up patch with changes to the language here. If you end up creating a new draft, you can pull my language changes into that, otherwise we can merge them separately.","commit_id":"b9e134d7e955b9180482d2f7c8844501c750adf6"}]}
