)]}'
{"oslo/messaging/_drivers/protocols/amqp/controller.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"ff683c0d50a00bf309a9b6e750353a963d325b51","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                    result_queue.put(result)"},{"line_number":334,"context_line":"            else:  # send failed/rejected/etc"},{"line_number":335,"context_line":"                msg \u003d \"Message send failed: remote disposition: %s, info: %s\""},{"line_number":336,"context_line":"                exc \u003d messaging.MessagingException(msg % (state, info))"},{"line_number":337,"context_line":"                result \u003d {\"status\": \"ERROR\", \"error\": exc}"},{"line_number":338,"context_line":"                if reply_expected:"},{"line_number":339,"context_line":"                    # no response will be received, so cancel the correlation"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2095cbe3","line":336,"updated":"2014-12-03 12:56:40.000000000","message":"MessagingException here looks too generic here.\n\nDrivers only raised MessagingTimeout or MessageDeliveryFailure.\n\nWhen the broker connection is lost, the driver try to send the message again and again\nuntil we have trying to reconnect to the broker a certain number of times (retry)\nand retry is by default infinite, if retry is reach, then MessageDeliveryFailure is raise.\n\nI known that AMQP1.0 driver currently doesn\u0027t implemented the \u0027retry\u0027, but it seems don\u0027t retry again and again too, also this driver is smarter to known why the message cannot be sent in certain case, MessageDeliveryFailure fit well for that case.\n\nDid you plan to do the same as other driver ? Or just raise \u0027MessageDeliveryFailure\u0027 after the first try ?","commit_id":"326844cddaa355019cb8dd6a779ed9f6f44bda8d"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"2bafac36f489099be6191947ee83809da91c4921","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                    result_queue.put(result)"},{"line_number":334,"context_line":"            else:  # send failed/rejected/etc"},{"line_number":335,"context_line":"                msg \u003d \"Message send failed: remote disposition: %s, info: %s\""},{"line_number":336,"context_line":"                exc \u003d messaging.MessagingException(msg % (state, info))"},{"line_number":337,"context_line":"                result \u003d {\"status\": \"ERROR\", \"error\": exc}"},{"line_number":338,"context_line":"                if reply_expected:"},{"line_number":339,"context_line":"                    # no response will be received, so cancel the correlation"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_94d241cf","line":336,"in_reply_to":"5a890539_2095cbe3","updated":"2014-12-03 13:59:27.000000000","message":"I agree MessagingException should be MessageDeliveryFailure instead.\n\nI\u0027d like to add support for \u0027retry\u0027 soon - I haven\u0027t had any spare cycles to think about how to properly do this.   In addition, I really should properly handle the different types of remote delivery states.  For example, a result of \u0027rejected\u0027 indicates a hard failure - the message cannot be transferred (MessageDeliveryFailure), while a result of \u0027released\u0027 could be interpreted as \u0027retry later\u0027.  I need to do a little research on how broker implementations like qpid-dispatch use these states.","commit_id":"326844cddaa355019cb8dd6a779ed9f6f44bda8d"}],"oslo_messaging/_drivers/protocols/amqp/driver.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f61a7c2bd3bed934dd44d65ebf90a14e37f6fdbd","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        LOG.debug(\"Send to %s\", target)"},{"line_number":186,"context_line":"        task \u003d drivertasks.SendTask(target, request, wait_for_reply, expire)"},{"line_number":187,"context_line":"        self._ctrl.add_task(task)"},{"line_number":188,"context_line":"        reply \u003d task.wait(timeout)"},{"line_number":189,"context_line":"        if reply:"},{"line_number":190,"context_line":"            # TODO(kgiusti) how to handle failure to un-marshal?  Must log, and"},{"line_number":191,"context_line":"            # determine best way to communicate this failure back up to the"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_d91035ab","line":188,"updated":"2015-06-05 06:57:10.000000000","message":"Should all this be done just if wait_for_reply is set? \n\nThe `task.wait` method is used to verify `sends` and for getting replies, right? I believe in this case you still want to check if we need to wait for a reply. IIUC, it\u0027s harmless to call `wait` except for the fact that the call itself may not be necessary when we\u0027re not expecting replies.","commit_id":"e3c107ad433e8b2e208d4ab67ee6ed48ab5afcab"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"757cf82e76d7a4a0bbe859b5fcd3eda740127c07","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        LOG.debug(\"Send to %s\", target)"},{"line_number":186,"context_line":"        task \u003d drivertasks.SendTask(target, request, wait_for_reply, expire)"},{"line_number":187,"context_line":"        self._ctrl.add_task(task)"},{"line_number":188,"context_line":"        reply \u003d task.wait(timeout)"},{"line_number":189,"context_line":"        if reply:"},{"line_number":190,"context_line":"            # TODO(kgiusti) how to handle failure to un-marshal?  Must log, and"},{"line_number":191,"context_line":"            # determine best way to communicate this failure back up to the"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_9dff3301","line":188,"in_reply_to":"3afb71cf_d91035ab","updated":"2015-06-05 16:20:00.000000000","message":"Actually, we do have to call wait() unconditionally regardless of whether a reply is expected or not because the caller needs to block until the command is run by the eventloop.  Otherwise the caller can queue up an unlimited number of commands and overload the eventloop.   This isn\u0027t an issue with RPC (wait_for_reply\u003dtrue) as that is self limiting, but casts/fanout/notifications can otherwise load up the queue with pending sends.  And if there\u0027s a failure at some point, the caller really doesn\u0027t know what got through and what msgs were dropped.\n\nSo the wait pends for the eventloop to execute the command, and, in the case of RPC, until the reply comes back (or times out).\n\nI suppose we could restructure the code to wait twice - once for the command to execute, and again to retrieve the reply in the case of RPC.  But waking the sender twice seems a little sub optimal to me.\n\nDoes that make sense?   I\u0027ll add a descriptive comment to clarify the code.","commit_id":"e3c107ad433e8b2e208d4ab67ee6ed48ab5afcab"}],"tests/test_amqp_driver.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f61a7c2bd3bed934dd44d65ebf90a14e37f6fdbd","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.assertEqual(self._broker.dropped_count, 2)"},{"line_number":287,"context_line":"        self.assertEqual(exception_count, 2)"},{"line_number":288,"context_line":"        self.assertTrue(\u0027topic-1.bad\u0027 in excepted_targets)"},{"line_number":289,"context_line":"        self.assertTrue(\u0027bad-topic.debug\u0027 in excepted_targets)"},{"line_number":290,"context_line":"        driver.cleanup()"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_5c1af36f","line":289,"updated":"2015-06-05 06:57:10.000000000","message":"There\u0027s an `assertIn` you can use:\n\n    self.assertIn(\u0027topic-1.bad\u0027, expected_targets)","commit_id":"e3c107ad433e8b2e208d4ab67ee6ed48ab5afcab"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"757cf82e76d7a4a0bbe859b5fcd3eda740127c07","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.assertEqual(self._broker.dropped_count, 2)"},{"line_number":287,"context_line":"        self.assertEqual(exception_count, 2)"},{"line_number":288,"context_line":"        self.assertTrue(\u0027topic-1.bad\u0027 in excepted_targets)"},{"line_number":289,"context_line":"        self.assertTrue(\u0027bad-topic.debug\u0027 in excepted_targets)"},{"line_number":290,"context_line":"        driver.cleanup()"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_02dbe27d","line":289,"in_reply_to":"3afb71cf_5c1af36f","updated":"2015-06-05 16:20:00.000000000","message":"Ah - didn\u0027t know that.  Thanks I\u0027ll update this.","commit_id":"e3c107ad433e8b2e208d4ab67ee6ed48ab5afcab"}]}
