)]}'
{"oslo/messaging/_drivers/impl_rabbit.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"748af2cb890d1cbc9a62d780a1e37748c4261b36","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception:"},{"line_number":167,"context_line":"            # NOTE(Mouad): Catching Exception b/c Kombu doesn\u0027t raise a proper"},{"line_number":168,"context_line":"            # error instead it\u0027s raise what the underlying transport library"},{"line_number":169,"context_line":"            # raise which can be either \u0027ampq.NotFound\u0027 or"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_2ef96a80","line":166,"updated":"2014-07-03 11:52:41.000000000","message":"What about trying to import one or the other and catch the specific exception? something along these lines\n\n  try:\n    import librabbitmq\n    exception \u003d librabbitmq.ChannelError\n  except ImportError:\n     ...\n     ...","commit_id":"6c25c336e64b8a68a1664c5ad772f6629cfad76a"},{"author":{"_account_id":7073,"name":"mouad benchchaoui","email":"m.benchchaoui@x-ion.de","username":"mouad"},"change_message_id":"7d9c7effa6404982c58b2c0dfbde44cf0ed8a24f","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception:"},{"line_number":167,"context_line":"            # NOTE(Mouad): Catching Exception b/c Kombu doesn\u0027t raise a proper"},{"line_number":168,"context_line":"            # error instead it\u0027s raise what the underlying transport library"},{"line_number":169,"context_line":"            # raise which can be either \u0027ampq.NotFound\u0027 or"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_eacf257d","line":166,"in_reply_to":"baada198_2ef96a80","updated":"2014-07-04 14:49:52.000000000","message":"I did think about doing something like that but I didn\u0027t bother because if there was an error outside of the race that except Exception: catched by mistake then this error will probably be raised in the second self.queue.declare().","commit_id":"6c25c336e64b8a68a1664c5ad772f6629cfad76a"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"748af2cb890d1cbc9a62d780a1e37748c4261b36","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            #   flag should be restored."},{"line_number":208,"context_line":"            #"},{"line_number":209,"context_line":"            # [1] http://www.rabbitmq.com/amqp-0-9-1-errata.html"},{"line_number":210,"context_line":"            self.queue.declare()"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def _callback_handler(self, message, callback):"},{"line_number":213,"context_line":"        \"\"\"Call callback with deserialized message."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_51ab9674","line":210,"updated":"2014-07-03 11:52:41.000000000","message":"What happens if we hit the same race here? AFAICT, it\u0027ll just fail miserably just as the previous code. I guess this needs to be executed in a probably smarter retry logic.\n\nIt\u0027s unlikely to hit this same race twice but it\u0027s probably still possible. Am I missing something?","commit_id":"6c25c336e64b8a68a1664c5ad772f6629cfad76a"},{"author":{"_account_id":7073,"name":"mouad benchchaoui","email":"m.benchchaoui@x-ion.de","username":"mouad"},"change_message_id":"7d9c7effa6404982c58b2c0dfbde44cf0ed8a24f","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            #   flag should be restored."},{"line_number":208,"context_line":"            #"},{"line_number":209,"context_line":"            # [1] http://www.rabbitmq.com/amqp-0-9-1-errata.html"},{"line_number":210,"context_line":"            self.queue.declare()"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def _callback_handler(self, message, callback):"},{"line_number":213,"context_line":"        \"\"\"Call callback with deserialized message."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_aab44d82","line":210,"in_reply_to":"baada198_51ab9674","updated":"2014-07-04 14:49:52.000000000","message":"AFAIK I don\u0027t think so, because:\n\n1. The race only happen when the node to which the service is connected to go down, and whenever that happen a reconnect() is called. \n\n2. Two tries to create the queue/exchange/binding are enough b/c the exchange can either be there or no when the binding happen, if it\u0027s there everything is fine now RabbitMQ will not delete the exchange anymore, if it\u0027s not there the second queue.declare() will create everything i.e. queue/exchange/binding from scratch.\n\nHope this made more sense.","commit_id":"6c25c336e64b8a68a1664c5ad772f6629cfad76a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"928fe3b2c1f452c24d3d081bb0814bd036cf90bd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception:"},{"line_number":167,"context_line":"            # NOTE(Mouad): Catching Exception b/c Kombu doesn\u0027t raise a proper"},{"line_number":168,"context_line":"            # error instead it\u0027s raise what the underlying transport library"},{"line_number":169,"context_line":"            # raise which can be either \u0027ampq.NotFound\u0027 or"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_5fc6499b","line":166,"updated":"2014-09-03 11:27:49.000000000","message":"I agree with Alexei partially. This is useful to have notes inline, but is must be shorter. It is hard to see a code lines between the notes. I\u0027d rather give an answers for controversial questions:\n\nWhy do we catch every exception? Why do we declare queue after an error again, if the same call raised an error?","commit_id":"f97a740795e4e4a66e7091df9b705d78f9a336a3"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4f095688596962f8d53852d9cb9ddafd6b3ed835","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception:"},{"line_number":167,"context_line":"            # NOTE(Mouad): Catching Exception b/c Kombu doesn\u0027t raise a proper"},{"line_number":168,"context_line":"            # error instead it\u0027s raise what the underlying transport library"},{"line_number":169,"context_line":"            # raise which can be either \u0027ampq.NotFound\u0027 or"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_4784685d","line":166,"in_reply_to":"fa98f980_5fc6499b","updated":"2014-11-26 08:01:37.000000000","message":"As Mouad already tried to explain, the underlying library does not generate a specific exception that could be matched easily, so we just catch all, excepting any non-transient error will come up again on the second attempt.\n\nWe declare the queue again, because the race condition is very unlikely to happen twice in a row, so this should function as a workaround until someone is able to avoid the race condition to happen in the first place.","commit_id":"f97a740795e4e4a66e7091df9b705d78f9a336a3"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"928fe3b2c1f452c24d3d081bb0814bd036cf90bd","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            # is used, this should not matter in this case b/c the next call"},{"line_number":172,"context_line":"            # of self.queue.declare will raise the same error in case we"},{"line_number":173,"context_line":"            # catched an error beside NotFound."},{"line_number":174,"context_line":"            LOG.exception(\"Declaring queue fail retrying ...\")"},{"line_number":175,"context_line":"            # NOTE(Mouad): Retry Queue creation to workaround race condition"},{"line_number":176,"context_line":"            # that may happen when both the client and broker race over"},{"line_number":177,"context_line":"            # exchange creation and deletion respectively which happen only"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_7f4a2d27","line":174,"updated":"2014-09-03 11:27:49.000000000","message":"Show an original exception message. I still believe we should know what happened.","commit_id":"f97a740795e4e4a66e7091df9b705d78f9a336a3"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4f095688596962f8d53852d9cb9ddafd6b3ed835","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            # is used, this should not matter in this case b/c the next call"},{"line_number":172,"context_line":"            # of self.queue.declare will raise the same error in case we"},{"line_number":173,"context_line":"            # catched an error beside NotFound."},{"line_number":174,"context_line":"            LOG.exception(\"Declaring queue fail retrying ...\")"},{"line_number":175,"context_line":"            # NOTE(Mouad): Retry Queue creation to workaround race condition"},{"line_number":176,"context_line":"            # that may happen when both the client and broker race over"},{"line_number":177,"context_line":"            # exchange creation and deletion respectively which happen only"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_877ad074","line":174,"in_reply_to":"fa98f980_7f4a2d27","updated":"2014-11-26 08:01:37.000000000","message":"Done","commit_id":"f97a740795e4e4a66e7091df9b705d78f9a336a3"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"da20ca5bbeee6aed64d1a8874854ce08334692bd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception as e:"},{"line_number":167,"context_line":"            # NOTE: This exception may be triggered by a race condition."},{"line_number":168,"context_line":"            # Simply retrying will solve the error most of the time and"},{"line_number":169,"context_line":"            # should work well enough as a workaround until the race condition"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_e6a70d4e","line":166,"updated":"2014-11-26 13:27:07.000000000","message":"Even the exception is amqp.NotFound or librabbitmq.ChannelError in the backtrace\nit can be catched with kombu with:\n\n    except connection.channel_errors as e:\n        ...","commit_id":"8d9ed0e5b54b71d70673bc115c4f2f87cf4f258f"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"30dbe95bcd11e5f1220be937d0410d94247d00a5","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception as e:"},{"line_number":167,"context_line":"            # NOTE: This exception may be triggered by a race condition."},{"line_number":168,"context_line":"            # Simply retrying will solve the error most of the time and"},{"line_number":169,"context_line":"            # should work well enough as a workaround until the race condition"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_df4bb4ae","line":166,"in_reply_to":"5a890539_5f80a4f6","updated":"2014-11-26 14:43:05.000000000","message":"Yep, but I haven\u0027t put -1 because \u0027connection\u0027  here must be kombu.Connection object that create the channel and it\u0027s not accessible in the scope of this class, except if you refactor a bit the Consumer class.","commit_id":"8d9ed0e5b54b71d70673bc115c4f2f87cf4f258f"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"6c241ca5d25aea6651cd1be34f44d5cbd6151326","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception as e:"},{"line_number":167,"context_line":"            # NOTE: This exception may be triggered by a race condition."},{"line_number":168,"context_line":"            # Simply retrying will solve the error most of the time and"},{"line_number":169,"context_line":"            # should work well enough as a workaround until the race condition"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_f5bc11b7","line":166,"in_reply_to":"5a890539_df4bb4ae","updated":"2014-11-26 15:27:58.000000000","message":"Shouldn\u0027t kombu.exceptions.ChannelError work, then?  Otherwise it wouldn\u0027t seem to make much sense to include kombu.extensions at all in this module.","commit_id":"8d9ed0e5b54b71d70673bc115c4f2f87cf4f258f"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"88fd2a9a6352bd666249567e250d70dbd9c643ee","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except Exception as e:"},{"line_number":167,"context_line":"            # NOTE: This exception may be triggered by a race condition."},{"line_number":168,"context_line":"            # Simply retrying will solve the error most of the time and"},{"line_number":169,"context_line":"            # should work well enough as a workaround until the race condition"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_5f80a4f6","line":166,"in_reply_to":"5a890539_e6a70d4e","updated":"2014-11-26 14:36:30.000000000","message":"O.k., thanks for the hint. I will upload a new patchset once the current gate issue are resolved.","commit_id":"8d9ed0e5b54b71d70673bc115c4f2f87cf4f258f"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"93997b89f129cb89d0624cbb72d1789061f623f1","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except kombu.exceptions.ChannelError as e:"},{"line_number":167,"context_line":"            # NOTE: This exception may be triggered by a race condition."},{"line_number":168,"context_line":"            # Simply retrying will solve the error most of the time and"},{"line_number":169,"context_line":"            # should work well enough as a workaround until the race condition"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_67713b44","line":166,"updated":"2014-11-27 10:07:47.000000000","message":"This works only with py-amqp transport not with librabbitmq,\nWe must use Exception, or refactor ConsumerBase to use \u0027channel_errors\u0027 of the kombu connection object that have created the channel.\n\nAnd I\u0027m fine with Exception, with a TODO that explain how we can catch the right exceptions.","commit_id":"39d871b3c683922ba3e5ef1fe96bf363d9a29002"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"03d7e75d2a8d5b48e83cd59b9e7e34d67b01291d","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.queue \u003d kombu.entity.Queue(**self.kwargs)"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            self.queue.declare()"},{"line_number":166,"context_line":"        except kombu.exceptions.ChannelError as e:"},{"line_number":167,"context_line":"            # NOTE: This exception may be triggered by a race condition."},{"line_number":168,"context_line":"            # Simply retrying will solve the error most of the time and"},{"line_number":169,"context_line":"            # should work well enough as a workaround until the race condition"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_53c32157","line":166,"in_reply_to":"5a890539_67713b44","updated":"2014-11-27 12:01:57.000000000","message":"Ok, reverted to the previous version and added a comment about the refactoring.","commit_id":"39d871b3c683922ba3e5ef1fe96bf363d9a29002"}]}
