)]}'
{"oslo/messaging/_drivers/impl_rabbit.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"a5b8f300030d28f9696e278c65408c1364741b52","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"import functools"},{"line_number":18,"context_line":"import itertools"},{"line_number":19,"context_line":"import logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_cb1668f1","line":16,"updated":"2014-05-22 10:39:51.000000000","message":"This breaks the blocking executor, the driver must not directly use eventlet.\nI guess the internal API of oslo.messaging should be improved to handle this kind of background task.","commit_id":"ad076584c3138d21a1daf169a3f2d914f3659239"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"b2e9601fd50d46715e0330687e22b1deb9266fda","unresolved":false,"context_lines":[{"line_number":811,"context_line":"            except StopIteration:"},{"line_number":812,"context_line":"                return"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"    def heartbeat(self):"},{"line_number":815,"context_line":"        if self.connection and self.connection.connected:"},{"line_number":816,"context_line":"            try:"},{"line_number":817,"context_line":"                self.connection.heartbeat_check()"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_70489787","line":814,"updated":"2014-09-03 14:34:00.000000000","message":"At least short doc string is desired for all added functions.","commit_id":"4005be094c1aba93f7e00060170c235f671831b9"},{"author":{"_account_id":5164,"name":"jsimms","email":"justin.simms@gmail.com","username":"jsimms"},"change_message_id":"e5a0739a487607418c97616ac702517853da8eae","unresolved":false,"context_lines":[{"line_number":819,"context_line":"                self.reconnect()"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    def heartbeat_required(self):"},{"line_number":822,"context_line":"        if not self.connection.heartbeat or self.connection.heartbeat \u003c\u003d 0:"},{"line_number":823,"context_line":"            return False"},{"line_number":824,"context_line":"        else:"},{"line_number":825,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_f43ca6e4","line":822,"updated":"2014-09-02 16:06:08.000000000","message":"The second condition can be shortened to:\n\nor not self.connection.heartbeat:","commit_id":"4005be094c1aba93f7e00060170c235f671831b9"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"b2e9601fd50d46715e0330687e22b1deb9266fda","unresolved":false,"context_lines":[{"line_number":819,"context_line":"                self.reconnect()"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    def heartbeat_required(self):"},{"line_number":822,"context_line":"        if not self.connection.heartbeat or self.connection.heartbeat \u003c\u003d 0:"},{"line_number":823,"context_line":"            return False"},{"line_number":824,"context_line":"        else:"},{"line_number":825,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_50347349","line":822,"in_reply_to":"fa98f980_f43ca6e4","updated":"2014-09-03 14:34:00.000000000","message":"Accordingly to your tip it will look like:\n\n    if not self.connection.heartbeat or not self.connection.heartbeat:\n\nIt is tautology. Even more\n\n    In [41]: not -1\n    Out[41]: False\n\n    In [42]: not 0\n    Out[42]: True\n\nSo, it is not the same\n    \n    self.connection.heartbeat \u003c\u003d 0\n    not self.connection.heartbeat\n\nBut it can be simplified in several ways.\nReduce else:\n\n         return False\n     return True\n\nReturn condition: \n \n    return not self.connection.heartbeat or self.connection.heartbeat \u003c\u003d 0","commit_id":"4005be094c1aba93f7e00060170c235f671831b9"},{"author":{"_account_id":5164,"name":"jsimms","email":"justin.simms@gmail.com","username":"jsimms"},"change_message_id":"2f809858fd53dbcb5cfdb516f4e59b410a4f34be","unresolved":false,"context_lines":[{"line_number":826,"context_line":""},{"line_number":827,"context_line":"    def heartbeat_interval(self):"},{"line_number":828,"context_line":"        if self.heartbeat_required():"},{"line_number":829,"context_line":"            return self.connection.heartbeat / 2.0"},{"line_number":830,"context_line":"        else:"},{"line_number":831,"context_line":"            return 0"},{"line_number":832,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_b79ce0c1","line":829,"updated":"2014-09-02 16:08:12.000000000","message":"What is the purpose of the 2? This constant should be moved to a constant that is defined someplace., or at least given an explanation for how it is meant to be used.","commit_id":"4005be094c1aba93f7e00060170c235f671831b9"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"b2e9601fd50d46715e0330687e22b1deb9266fda","unresolved":false,"context_lines":[{"line_number":826,"context_line":""},{"line_number":827,"context_line":"    def heartbeat_interval(self):"},{"line_number":828,"context_line":"        if self.heartbeat_required():"},{"line_number":829,"context_line":"            return self.connection.heartbeat / 2.0"},{"line_number":830,"context_line":"        else:"},{"line_number":831,"context_line":"            return 0"},{"line_number":832,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_d0a86322","line":829,"in_reply_to":"fa98f980_b79ce0c1","updated":"2014-09-03 14:34:00.000000000","message":"Agree.","commit_id":"4005be094c1aba93f7e00060170c235f671831b9"},{"author":{"_account_id":9257,"name":"John Eckersberg","email":"jeckersb@redhat.com","username":"jeckersb"},"change_message_id":"6e54665d5d10503f17b83a74650b327a8397cf82","unresolved":false,"context_lines":[{"line_number":823,"context_line":"                    self.connection.heartbeat_check()"},{"line_number":824,"context_line":"                    self.next_heartbeat \u003d time.time() + \\"},{"line_number":825,"context_line":"                        self._heartbeat_interval()"},{"line_number":826,"context_line":"                except kombu.exceptions.InconsistencyError:"},{"line_number":827,"context_line":"                    self.reconnect()"},{"line_number":828,"context_line":"            return self.next_heartbeat"},{"line_number":829,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_254bba5a","line":826,"updated":"2014-09-29 15:36:56.000000000","message":"In my testing, I\u0027m seeing two other errors that are causing problems here.\n\nThe first is to also catch and reconnect on socket.error.  Sometimes that bubbles out and isn\u0027t caught by kombu (why exactly I don\u0027t know).  But without that, it gets into a state where it forever tries to keep heartbeating on the dead connection, and a broken pipe exception gets raised repeatedly.  The service (nova-conductor in this case) will never reconnect until it is restarted.\n\nI think this also needs to catch amqp.exceptions.ConnectionForced.  If that exception is allowed to propagate up from one connection, it can cause all other active connections to miss their next heartbeat and all get reset.  If however that exception is handled here, then all other connections keep heartbeating as expected and they do not get reset due to missed heartbeats.","commit_id":"7d0b5dbe983444952a686d82b97b06565f3e876c"}]}
