)]}'
{"oslo_messaging/_drivers/impl_pika.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c86b48312a5cb251cc878a995f7b8a70b7609434","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    cfg.IntOpt(\u0027frame_max\u0027, default\u003dNone, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":46,"context_line":"               help\u003d\u0027The maximum byte size for an AMQP frame\u0027),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027heartbeat_interval\u0027, default\u003dNone,"},{"line_number":48,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":49,"context_line":"               help\u003d\u0027How often to send heartbeats\u0027),"},{"line_number":50,"context_line":"    cfg.BoolOpt(\u0027ssl\u0027, default\u003dNone, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":51,"context_line":"                help\u003d\u0027Enable SSL\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_f99cafc1","line":48,"updated":"2015-10-08 15:48:55.000000000","message":"New option doesn\u0027t need to be in deprecated group.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"88071ee637c6157063cc50bcff4abe90befeab8c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    cfg.IntOpt(\u0027frame_max\u0027, default\u003dNone, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":46,"context_line":"               help\u003d\u0027The maximum byte size for an AMQP frame\u0027),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027heartbeat_interval\u0027, default\u003dNone,"},{"line_number":48,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":49,"context_line":"               help\u003d\u0027How often to send heartbeats\u0027),"},{"line_number":50,"context_line":"    cfg.BoolOpt(\u0027ssl\u0027, default\u003dNone, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":51,"context_line":"                help\u003d\u0027Enable SSL\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_ec6332af","line":48,"in_reply_to":"7a2fa921_f99cafc1","updated":"2015-10-11 15:57:24.000000000","message":"Will do","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c86b48312a5cb251cc878a995f7b8a70b7609434","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    cfg.FloatOpt(\u0027socket_timeout\u0027, default\u003dNone,"},{"line_number":55,"context_line":"                 deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":56,"context_line":"                 help\u003d\u0027Use for high latency networks\u0027),"},{"line_number":57,"context_line":"    cfg.StrOpt(\u0027locale\u0027, default\u003dNone, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":58,"context_line":"               help\u003d\u0027Set the locale value\u0027),"},{"line_number":59,"context_line":"    cfg.BoolOpt(\u0027backpressure_detection\u0027, default\u003dNone,"},{"line_number":60,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_84974e47","line":57,"updated":"2015-10-08 15:48:55.000000000","message":"I don\u0027t thing we should deal with locale like this.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"88071ee637c6157063cc50bcff4abe90befeab8c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    cfg.FloatOpt(\u0027socket_timeout\u0027, default\u003dNone,"},{"line_number":55,"context_line":"                 deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":56,"context_line":"                 help\u003d\u0027Use for high latency networks\u0027),"},{"line_number":57,"context_line":"    cfg.StrOpt(\u0027locale\u0027, default\u003dNone, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":58,"context_line":"               help\u003d\u0027Set the locale value\u0027),"},{"line_number":59,"context_line":"    cfg.BoolOpt(\u0027backpressure_detection\u0027, default\u003dNone,"},{"line_number":60,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_8c563ecc","line":57,"in_reply_to":"7a2fa921_84974e47","updated":"2015-10-11 15:57:24.000000000","message":"will do","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c86b48312a5cb251cc878a995f7b8a70b7609434","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    cfg.BoolOpt(\u0027notification_persistence\u0027, default\u003dFalse,"},{"line_number":85,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":86,"context_line":"                help\u003d\"Persist notification messages.\"),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027default_notification_exchange\u0027, default\u003dNone,"},{"line_number":88,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":89,"context_line":"               help\u003d\"Exchange name for for sending notifications\")"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_79fadf76","line":87,"updated":"2015-10-08 15:48:55.000000000","message":"Perhaps we should use the one in notifier/notifier instead.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e88391fe96203547af7fb21d424674dd8e73eb82","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    cfg.BoolOpt(\u0027notification_persistence\u0027, default\u003dFalse,"},{"line_number":85,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":86,"context_line":"                help\u003d\"Persist notification messages.\"),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027default_notification_exchange\u0027, default\u003dNone,"},{"line_number":88,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":89,"context_line":"               help\u003d\"Exchange name for for sending notifications\")"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_0448b486","line":87,"in_reply_to":"7a2fa921_53d75bed","updated":"2015-10-13 12:19:05.000000000","message":"ah, clear","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"151268c4d59d1a4d6cbc12aaf5498f9d4a792f40","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    cfg.BoolOpt(\u0027notification_persistence\u0027, default\u003dFalse,"},{"line_number":85,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":86,"context_line":"                help\u003d\"Persist notification messages.\"),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027default_notification_exchange\u0027, default\u003dNone,"},{"line_number":88,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":89,"context_line":"               help\u003d\"Exchange name for for sending notifications\")"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_53d75bed","line":87,"in_reply_to":"7a2fa921_7650505f","updated":"2015-10-12 09:44:20.000000000","message":"The default exchange is passed to the Driver construtor.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"88071ee637c6157063cc50bcff4abe90befeab8c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    cfg.BoolOpt(\u0027notification_persistence\u0027, default\u003dFalse,"},{"line_number":85,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":86,"context_line":"                help\u003d\"Persist notification messages.\"),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027default_notification_exchange\u0027, default\u003dNone,"},{"line_number":88,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":89,"context_line":"               help\u003d\"Exchange name for for sending notifications\")"},{"line_number":90,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_7650505f","line":87,"in_reply_to":"7a2fa921_79fadf76","updated":"2015-10-11 15:57:24.000000000","message":"hm, could you send me a link. I can\u0027t find this option in source code","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c86b48312a5cb251cc878a995f7b8a70b7609434","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    cfg.IntOpt(\u0027rpc_queue_expiration\u0027, default\u003d60, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":94,"context_line":"               help\u003d\"Time to live for rpc queues without consumers in \""},{"line_number":95,"context_line":"                    \"seconds.\"),"},{"line_number":96,"context_line":"    cfg.StrOpt(\u0027default_rpc_exchange\u0027, default\u003dNone,"},{"line_number":97,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":98,"context_line":"               help\u003d\"Exchange name for for sending RPC messages\"),"},{"line_number":99,"context_line":"    cfg.StrOpt(\u0027rpc_reply_exchange\u0027, default\u003d\"openstack_rpc\","}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_d9f533ed","line":96,"updated":"2015-10-08 15:48:55.000000000","message":"We should use default set in transport \u0027control_exchange\u0027, not defining a new one.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"151268c4d59d1a4d6cbc12aaf5498f9d4a792f40","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    cfg.IntOpt(\u0027rpc_queue_expiration\u0027, default\u003d60, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":94,"context_line":"               help\u003d\"Time to live for rpc queues without consumers in \""},{"line_number":95,"context_line":"                    \"seconds.\"),"},{"line_number":96,"context_line":"    cfg.StrOpt(\u0027default_rpc_exchange\u0027, default\u003dNone,"},{"line_number":97,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":98,"context_line":"               help\u003d\"Exchange name for for sending RPC messages\"),"},{"line_number":99,"context_line":"    cfg.StrOpt(\u0027rpc_reply_exchange\u0027, default\u003d\"openstack_rpc\","}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_76cda585","line":96,"in_reply_to":"7a2fa921_2c4fea34","updated":"2015-10-12 09:44:20.000000000","message":"More precisely, the default exchange is passed to the Driver constructor. I agree this is an issue. But today, an application can override the default by using transport.set_transport_defaults() and many applications do it.\n\nI see two solutions to not break the public API:\n* we use the value that comes from the public API as a \u0027prefix\u0027  to create default exchange names for example for nova: \u0027nova-rpc\u0027, \u0027nova-rpc-replies\u0027, and \u0027nova-notifications\u0027  (similar to your proposal but doesn\u0027t break the public API.)\n* we change the public API to make it aware of this. (I\u0027m not sure the term \u0027exchange\u0027 have a sense for all drivers but anyways)\n\nI\u0027m more favorable to the first solution. It\u0027s less intrusive. Allowing the application to override the default exchange is an historic thing to avoid conflict between applications that can have topic/queues with the name (AFAIR when the nova/cinder split occurs ). I\u0027m sure that deployer now creates vhost now to do this, but we can\u0027t break things.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e88391fe96203547af7fb21d424674dd8e73eb82","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    cfg.IntOpt(\u0027rpc_queue_expiration\u0027, default\u003d60, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":94,"context_line":"               help\u003d\"Time to live for rpc queues without consumers in \""},{"line_number":95,"context_line":"                    \"seconds.\"),"},{"line_number":96,"context_line":"    cfg.StrOpt(\u0027default_rpc_exchange\u0027, default\u003dNone,"},{"line_number":97,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":98,"context_line":"               help\u003d\"Exchange name for for sending RPC messages\"),"},{"line_number":99,"context_line":"    cfg.StrOpt(\u0027rpc_reply_exchange\u0027, default\u003d\"openstack_rpc\","}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_0710b6a7","line":96,"in_reply_to":"7a2fa921_76cda585","updated":"2015-10-13 12:19:05.000000000","message":"Is it ok for you if I modify first solution a litle bit and define\n\ncfg.StrOpt(\u0027default_rpc_exchange\u0027, default\u003d\"${control_exchange}_rpc\")?","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"88071ee637c6157063cc50bcff4abe90befeab8c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    cfg.IntOpt(\u0027rpc_queue_expiration\u0027, default\u003d60, deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":94,"context_line":"               help\u003d\"Time to live for rpc queues without consumers in \""},{"line_number":95,"context_line":"                    \"seconds.\"),"},{"line_number":96,"context_line":"    cfg.StrOpt(\u0027default_rpc_exchange\u0027, default\u003dNone,"},{"line_number":97,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027,"},{"line_number":98,"context_line":"               help\u003d\"Exchange name for for sending RPC messages\"),"},{"line_number":99,"context_line":"    cfg.StrOpt(\u0027rpc_reply_exchange\u0027, default\u003d\"openstack_rpc\","}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_2c4fea34","line":96,"in_reply_to":"7a2fa921_d9f533ed","updated":"2015-10-11 15:57:24.000000000","message":"Hm... I see the next problem... Exchange is not only name... It is exchange type and other exchange options. This configuration some times depends on message type used. For example notifications require persistence os we should use durable exchange. Default exchange for all is huge limitation and makes defaults not optimal or not useful at all. I propose use separate defaults for different types of messages.\ndefault for rpc, for rpc_replies and notifications. What do you think?","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c86b48312a5cb251cc878a995f7b8a70b7609434","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                    connection_retry \u003d min("},{"line_number":324,"context_line":"                        connection_retry,"},{"line_number":325,"context_line":"                        execute_try_count + self.connection_retry"},{"line_number":326,"context_line":"                    )"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"                execute_try_count +\u003d 1"},{"line_number":329,"context_line":"                if execute_try_count \u003e connection_retry:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_b932b75c","line":326,"updated":"2015-10-08 15:48:55.000000000","message":"Other drivers retry indefinitely, I don\u0027t think application that consume the lib will handle the fact that connection can fail. This introduce a thing/API that application should handle. \n\nI\u0027m not saying retry indefinitely is a bad thing, but we need to ensure application can handle this if we go this way.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e88391fe96203547af7fb21d424674dd8e73eb82","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                    connection_retry \u003d min("},{"line_number":324,"context_line":"                        connection_retry,"},{"line_number":325,"context_line":"                        execute_try_count + self.connection_retry"},{"line_number":326,"context_line":"                    )"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"                execute_try_count +\u003d 1"},{"line_number":329,"context_line":"                if execute_try_count \u003e connection_retry:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_c4739ce6","line":326,"in_reply_to":"7a2fa921_b932b75c","updated":"2015-10-13 12:19:05.000000000","message":"ok, will implement current approach.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c86b48312a5cb251cc878a995f7b8a70b7609434","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"]"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"class PikaDriverCompatibleWithRabbitDriver(PikaDriver):"},{"line_number":1064,"context_line":"    \"\"\"Old RabbitMQ driver creates exchange before sending message."},{"line_number":1065,"context_line":"    In this case if no rpc service listen this exchange message will be sent"},{"line_number":1066,"context_line":"    to /dev/null but client will know anything about it. That is strange."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_04bc9eda","line":1063,"updated":"2015-10-08 15:48:55.000000000","message":"Not sure we should keep this. I guess it was mainly because all queues/exchanges doesn\u0027t have x-expires set in the other driver.","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e88391fe96203547af7fb21d424674dd8e73eb82","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"]"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"class PikaDriverCompatibleWithRabbitDriver(PikaDriver):"},{"line_number":1064,"context_line":"    \"\"\"Old RabbitMQ driver creates exchange before sending message."},{"line_number":1065,"context_line":"    In this case if no rpc service listen this exchange message will be sent"},{"line_number":1066,"context_line":"    to /dev/null but client will know anything about it. That is strange."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_e2448b1c","line":1063,"in_reply_to":"7a2fa921_04bc9eda","updated":"2015-10-13 12:19:05.000000000","message":"It is because old driver does not use mandatory flag. Therefore if queue isnt binded to exchange (rpc server doesnt listen in our case) that is ok for old driver and it return that message was succesfuly sent. We waiting for timeout expiration and returning Messaging timeot exception\n\nI think we should because it breaks API. At least our tests catches exceptions.MessagingTimeout exception in such situation.\nOr we could change tests and then be ready to fix some problems in projects","commit_id":"9e5bc53f05b172dca0e14d3658f21ac9a8d74c40"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9d587777a95fefbcf6a6211c35553a6f0f6cdb52","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            self._pika_params_list[host_index]"},{"line_number":287,"context_line":"        )"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def execute_with_connection_retry(self, f, *args, **kwargs):"},{"line_number":290,"context_line":"        execute_try_count \u003d 0"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        # in case of connection error we will check all possible"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_ab72cfab","line":289,"updated":"2015-10-13 01:23:27.000000000","message":"Both of these two retrying methods can probably just use something in oslo:\n\nhttps://github.com/openstack/oslo.service/blob/master/oslo_service/loopingcall.py#L198\n\nOr just directly use:\n\nhttps://github.com/rholder/retrying","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"d5d609828b4a16ea6c164e215aaa3c7865ddd2a2","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            self._pika_params_list[host_index]"},{"line_number":287,"context_line":"        )"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def execute_with_connection_retry(self, f, *args, **kwargs):"},{"line_number":290,"context_line":"        execute_try_count \u003d 0"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        # in case of connection error we will check all possible"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_184d7372","line":289,"in_reply_to":"7a2fa921_ab72cfab","updated":"2015-10-13 18:49:38.000000000","message":"Done","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9d587777a95fefbcf6a6211c35553a6f0f6cdb52","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                    continue"},{"line_number":460,"context_line":"                i \u003d 0"},{"line_number":461,"context_line":"                curtime \u003d time.time()"},{"line_number":462,"context_line":"                while i \u003c len(self._on_reply_callback_list):"},{"line_number":463,"context_line":"                    msg_id, callback, expiration \u003d ("},{"line_number":464,"context_line":"                        self._on_reply_callback_list[i]"},{"line_number":465,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_aba96fe1","line":462,"updated":"2015-10-13 01:23:27.000000000","message":"Should this loop also check \u0027self._reply_consumer_thread_run_flag\u0027 ?","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"d5d609828b4a16ea6c164e215aaa3c7865ddd2a2","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                    continue"},{"line_number":460,"context_line":"                i \u003d 0"},{"line_number":461,"context_line":"                curtime \u003d time.time()"},{"line_number":462,"context_line":"                while i \u003c len(self._on_reply_callback_list):"},{"line_number":463,"context_line":"                    msg_id, callback, expiration \u003d ("},{"line_number":464,"context_line":"                        self._on_reply_callback_list[i]"},{"line_number":465,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_180573c1","line":462,"in_reply_to":"7a2fa921_aba96fe1","updated":"2015-10-13 18:49:38.000000000","message":"hm... it just goes through all registered relply waiters one time. I don\u0027t expect that it takes a lot of time. but probably you are right we can add this check for sure.","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9d587777a95fefbcf6a6211c35553a6f0f6cdb52","unresolved":false,"context_lines":[{"line_number":639,"context_line":""},{"line_number":640,"context_line":"            msg[\u0027_reply_q\u0027] \u003d self._pika_engine.get_reply_q()"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"            reply_received \u003d threading.Event()"},{"line_number":643,"context_line":"            reply \u003d [None]"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"            def on_reply(message):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_8bf27305","line":642,"updated":"2015-10-13 01:23:27.000000000","message":"U can probably just collapse both of this by using one of:\n\nhttp://docs.openstack.org/developer/futurist/api.html#futures\n\n    \u003e\u003e\u003e import futurist\n    \u003e\u003e\u003e f \u003d futurist.Future()\n    \u003e\u003e\u003e f.set_result(\"a\")\n    \u003e\u003e\u003e f.result(timeout\u003d1)\n    \u0027a\u0027","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"d5d609828b4a16ea6c164e215aaa3c7865ddd2a2","unresolved":false,"context_lines":[{"line_number":639,"context_line":""},{"line_number":640,"context_line":"            msg[\u0027_reply_q\u0027] \u003d self._pika_engine.get_reply_q()"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"            reply_received \u003d threading.Event()"},{"line_number":643,"context_line":"            reply \u003d [None]"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"            def on_reply(message):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_d6f58783","line":642,"in_reply_to":"7a2fa921_8bf27305","updated":"2015-10-13 18:49:38.000000000","message":"Done","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9d587777a95fefbcf6a6211c35553a6f0f6cdb52","unresolved":false,"context_lines":[{"line_number":683,"context_line":"        self._message_queue \u003d collections.deque()"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        self.start()"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"        if not lazy_connect:"},{"line_number":688,"context_line":"            self._reconnect()"},{"line_number":689,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_0be74341","line":686,"updated":"2015-10-13 01:23:27.000000000","message":"Any reason to do this in the constructor vs just requiring the user to call start()?\n\nI\u0027ve always preferred the explicit start(), thoughts?","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"d5d609828b4a16ea6c164e215aaa3c7865ddd2a2","unresolved":false,"context_lines":[{"line_number":683,"context_line":"        self._message_queue \u003d collections.deque()"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        self.start()"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"        if not lazy_connect:"},{"line_number":688,"context_line":"            self._reconnect()"},{"line_number":689,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_2c87d010","line":686,"in_reply_to":"7a2fa921_0be74341","updated":"2015-10-13 18:49:38.000000000","message":"Agree, but now logic which uses this class doesn\u0027t call start... Maximum I can do in this patch execute start \nin listen and listen_for_notifications methods now","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9d587777a95fefbcf6a6211c35553a6f0f6cdb52","unresolved":false,"context_lines":[{"line_number":713,"context_line":"            except Exception as ex:"},{"line_number":714,"context_line":"                if not pika_pool.Connection.is_connection_invalidated(ex):"},{"line_number":715,"context_line":"                    LOG.exception(\"Unexpected error during closing channel\")"},{"line_number":716,"context_line":"            self._channel \u003d None"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        if self._connection:"},{"line_number":719,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_8b403309","line":716,"updated":"2015-10-13 01:23:27.000000000","message":"Perhaps a good idea to not set the channel to none if it wasn\u0027t actually closed right?","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"d5d609828b4a16ea6c164e215aaa3c7865ddd2a2","unresolved":false,"context_lines":[{"line_number":713,"context_line":"            except Exception as ex:"},{"line_number":714,"context_line":"                if not pika_pool.Connection.is_connection_invalidated(ex):"},{"line_number":715,"context_line":"                    LOG.exception(\"Unexpected error during closing channel\")"},{"line_number":716,"context_line":"            self._channel \u003d None"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        if self._connection:"},{"line_number":719,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_782ca7ab","line":716,"in_reply_to":"7a2fa921_8b403309","updated":"2015-10-13 18:49:38.000000000","message":"The problem is that anyway we can do nothing in this case. We detect problem and should reconnect. We don\u0027t know what is the problem but trying to release resources gracefully (close connection). If during this process we get exception and it does not say us that connection already closed - we know that somthing went wrong and write log. self._connection is None and self._channel is None is the marker that we dont have established connection and our poll method will perform reconnect before polling.","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9d587777a95fefbcf6a6211c35553a6f0f6cdb52","unresolved":false,"context_lines":[{"line_number":721,"context_line":"            except Exception as ex:"},{"line_number":722,"context_line":"                if not pika_pool.Connection.is_connection_invalidated(ex):"},{"line_number":723,"context_line":"                    LOG.exception(\"Unexpected error during closing connection\")"},{"line_number":724,"context_line":"            self._connection \u003d None"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    def poll(self, timeout\u003dNone):"},{"line_number":727,"context_line":"        start \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_6b48372e","line":724,"updated":"2015-10-13 01:23:27.000000000","message":"Perhaps a good idea to not set the connection to none if it wasn\u0027t actually closed right?","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"d5d609828b4a16ea6c164e215aaa3c7865ddd2a2","unresolved":false,"context_lines":[{"line_number":721,"context_line":"            except Exception as ex:"},{"line_number":722,"context_line":"                if not pika_pool.Connection.is_connection_invalidated(ex):"},{"line_number":723,"context_line":"                    LOG.exception(\"Unexpected error during closing connection\")"},{"line_number":724,"context_line":"            self._connection \u003d None"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    def poll(self, timeout\u003dNone):"},{"line_number":727,"context_line":"        start \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_f8167754","line":724,"in_reply_to":"7a2fa921_6b48372e","updated":"2015-10-13 18:49:38.000000000","message":"The same","commit_id":"0a5b9ec45ee2f72f558962fa8a8ad4d773709da4"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"ff8359bac3544af9ccc5a143871510c723a1c7b3","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    return self.create_host_connection("},{"line_number":301,"context_line":"                        self._pika_next_connection_num"},{"line_number":302,"context_line":"                    )"},{"line_number":303,"context_line":"                except pika_pool.Connection.connectivity_errors:"},{"line_number":304,"context_line":"                    connection_attempts -\u003d 1"},{"line_number":305,"context_line":"                    continue"},{"line_number":306,"context_line":"                finally:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_4e58f3fa","line":303,"updated":"2015-10-13 23:20:45.000000000","message":"Should this be logged vs silently dropped?","commit_id":"06b0c2c9b390da7be068053aa6385b844e27adb3"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e5b9e2e48c34aa928765c01772af72c8b51809fd","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    return self.create_host_connection("},{"line_number":301,"context_line":"                        self._pika_next_connection_num"},{"line_number":302,"context_line":"                    )"},{"line_number":303,"context_line":"                except pika_pool.Connection.connectivity_errors:"},{"line_number":304,"context_line":"                    connection_attempts -\u003d 1"},{"line_number":305,"context_line":"                    continue"},{"line_number":306,"context_line":"                finally:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_645b422f","line":303,"in_reply_to":"5a2ca52d_4e58f3fa","updated":"2015-10-15 12:53:23.000000000","message":"Done","commit_id":"06b0c2c9b390da7be068053aa6385b844e27adb3"}]}
