)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13290,"name":"Oleksii Zamiatin","email":"ozamiatin@mirantis.com","username":"ozamiatin"},"change_message_id":"a170290330ed9f8e04634a3428f94da5cc012895","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use channel pool in RabbitMQ driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Current implementation of RabbitMQ driver in in Connection.reset() change"},{"line_number":10,"context_line":"the channel to use and create a new channel for it. So it creates a new"},{"line_number":11,"context_line":"channel after the each message send."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7a016987_9dcbc972","line":9,"updated":"2015-05-14 12:10:17.000000000","message":"nit: double in","commit_id":"959e53cc32f74382c47867d19b4a318a5834de6b"}],"oslo_messaging/_drivers/impl_rabbit.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"47abacd461ae1f0f0b90f7a7c7d68cd6890d456b","unresolved":false,"context_lines":[{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        # NOTE(viktors): Should we add separate conf option for ChannelPool?"},{"line_number":559,"context_line":"        self.channel_pool \u003d self.connection.ChannelPool("},{"line_number":560,"context_line":"            limit\u003dself.driver_conf.rpc_conn_pool_size)"},{"line_number":561,"context_line":"        # NOTE(sileht): kombu recommend to run heartbeat_check every"},{"line_number":562,"context_line":"        # seconds, but we use a lock around the kombu connection"},{"line_number":563,"context_line":"        # so, to not lock to much this lock to most of the time do nothing"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_006f052c","line":560,"updated":"2015-05-18 18:55:42.000000000","message":"The Connection object works in a synchronous way. So I think only one channel will be used at a time for one Connection object. I\u0027m not sure a ChannelPool help here. Perhaps just not closing the channel in reset() is sufficient.","commit_id":"959e53cc32f74382c47867d19b4a318a5834de6b"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"9eda224821b27e50c09cb217fe9f43196df1a86a","unresolved":false,"context_lines":[{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        # NOTE(viktors): Should we add separate conf option for ChannelPool?"},{"line_number":559,"context_line":"        self.channel_pool \u003d self.connection.ChannelPool("},{"line_number":560,"context_line":"            limit\u003dself.driver_conf.rpc_conn_pool_size)"},{"line_number":561,"context_line":"        # NOTE(sileht): kombu recommend to run heartbeat_check every"},{"line_number":562,"context_line":"        # seconds, but we use a lock around the kombu connection"},{"line_number":563,"context_line":"        # so, to not lock to much this lock to most of the time do nothing"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_33b7eff6","line":560,"in_reply_to":"7a016987_006f052c","updated":"2015-05-19 12:27:07.000000000","message":"Hi Mehdi,\n\nJust to ensure - should we make a reset() method from line 804 similar to this ? - \n\n     def reset(self):\n         \"\"\"Reset a connection so it can be used again.\"\"\"\n         self._consumers \u003d []","commit_id":"959e53cc32f74382c47867d19b4a318a5834de6b"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"57b7e77b2a73ceaaedcaa8cb264af5dceb864594","unresolved":false,"context_lines":[{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        # NOTE(viktors): Should we add separate conf option for ChannelPool?"},{"line_number":559,"context_line":"        self.channel_pool \u003d self.connection.ChannelPool("},{"line_number":560,"context_line":"            limit\u003dself.driver_conf.rpc_conn_pool_size)"},{"line_number":561,"context_line":"        # NOTE(sileht): kombu recommend to run heartbeat_check every"},{"line_number":562,"context_line":"        # seconds, but we use a lock around the kombu connection"},{"line_number":563,"context_line":"        # so, to not lock to much this lock to most of the time do nothing"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_9c94f244","line":560,"in_reply_to":"7a016987_33b7eff6","updated":"2015-05-26 06:12:43.000000000","message":"Almost, we need to undeclare this consumer too.","commit_id":"959e53cc32f74382c47867d19b4a318a5834de6b"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"ce6042bea8c77eae79905f499a93ce1aa76c3d3f","unresolved":false,"context_lines":[{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        # NOTE(viktors): Should we add separate conf option for ChannelPool?"},{"line_number":559,"context_line":"        self.channel_pool \u003d self.connection.ChannelPool("},{"line_number":560,"context_line":"            limit\u003dself.driver_conf.rpc_conn_pool_size)"},{"line_number":561,"context_line":"        # NOTE(sileht): kombu recommend to run heartbeat_check every"},{"line_number":562,"context_line":"        # seconds, but we use a lock around the kombu connection"},{"line_number":563,"context_line":"        # so, to not lock to much this lock to most of the time do nothing"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_3ad29b35","line":560,"in_reply_to":"7a016987_9c94f244","updated":"2015-05-26 09:01:44.000000000","message":"Done","commit_id":"959e53cc32f74382c47867d19b4a318a5834de6b"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"15c32596a7970e0fe3ede1a3bdd9123cf1b15ebc","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    def reset(self):"},{"line_number":793,"context_line":"        \"\"\"Reset a connection so it can be used again.\"\"\""},{"line_number":794,"context_line":"        for consumer in self._consumers:"},{"line_number":795,"context_line":"            consumer.declare(self)"},{"line_number":796,"context_line":""},{"line_number":797,"context_line":"    def _heartbeat_supported_and_enabled(self):"},{"line_number":798,"context_line":"        if self.driver_conf.heartbeat_timeout_threshold \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_311cf976","line":795,"updated":"2015-05-26 13:27:59.000000000","message":"The goals of reset is cleanup previous usage of the Connection object, so we must undeclare the consumer, not to redeclare it. So I\u0027m thinking more of something like that:\n\n    diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py\n    index b3028ce..23f37cf 100644\n    --- a/oslo_messaging/_drivers/impl_rabbit.py\n    +++ b/oslo_messaging/_drivers/impl_rabbit.py\n    @@ -231,6 +231,9 @@ class Consumer(object):\n                                consumer_tag\u003dsix.text_type(tag),\n                                nowait\u003dself.nowait)\n     \n    +    def cancel(self, tag):\n    +        self.queue.cancel(six.text_type(tag))\n    +\n         def _callback(self, message):\n             \"\"\"Call callback with deserialized message.\n     \n    @@ -687,11 +690,12 @@ class Connection(object):\n     \n             with self._connection_lock:\n                 try:\n    -                self._set_current_channel(self.connection.channel())\n    +                for tag, consumer in enumerate(self._consumers):\n    +                    consumer.cancel(tag\u003dtag)\n                 except recoverable_errors:\n                     self._set_current_channel(None)\n                     self.ensure_connection()\n    -        self._consumers \u003d []\n    +            self._consumers \u003d []\n     \n         def _heartbeat_supported_and_enabled(self):\n             if self.driver_conf.heartbeat_timeout_threshold \u003c\u003d 0:","commit_id":"a9992881b79ba54fe67d9f33d948fc6732af9478"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"664ef712788406db147c34951097ed8db077e61a","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    def reset(self):"},{"line_number":793,"context_line":"        \"\"\"Reset a connection so it can be used again.\"\"\""},{"line_number":794,"context_line":"        for consumer in self._consumers:"},{"line_number":795,"context_line":"            consumer.declare(self)"},{"line_number":796,"context_line":""},{"line_number":797,"context_line":"    def _heartbeat_supported_and_enabled(self):"},{"line_number":798,"context_line":"        if self.driver_conf.heartbeat_timeout_threshold \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_58b898e5","line":795,"in_reply_to":"7a016987_311cf976","updated":"2015-05-27 07:38:38.000000000","message":"Done","commit_id":"a9992881b79ba54fe67d9f33d948fc6732af9478"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"0213df3ad62ab682989b956fefa22d42b0afd895","unresolved":false,"context_lines":[{"line_number":804,"context_line":"            except recoverable_errors:"},{"line_number":805,"context_line":"                self._set_current_channel(None)"},{"line_number":806,"context_line":"                self.ensure_connection()"},{"line_number":807,"context_line":"                self._consumers \u003d []"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":"    def _heartbeat_supported_and_enabled(self):"},{"line_number":810,"context_line":"        if self.driver_conf.heartbeat_timeout_threshold \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_788114fb","line":807,"updated":"2015-05-27 07:40:39.000000000","message":"Indentation is wrong, the \u0027self._consumers \u003d []\u0027 should be outside the \u0027except\u0027, to always reset the consumers list.","commit_id":"b84fd474df05c64304f86efdd21dc126c707161d"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"5fd1c7050c2f626a9019f9e6d1cf0ee81af40f59","unresolved":false,"context_lines":[{"line_number":804,"context_line":"            except recoverable_errors:"},{"line_number":805,"context_line":"                self._set_current_channel(None)"},{"line_number":806,"context_line":"                self.ensure_connection()"},{"line_number":807,"context_line":"                self._consumers \u003d []"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":"    def _heartbeat_supported_and_enabled(self):"},{"line_number":810,"context_line":"        if self.driver_conf.heartbeat_timeout_threshold \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_78347449","line":807,"in_reply_to":"7a016987_788114fb","updated":"2015-05-27 07:46:44.000000000","message":"Done","commit_id":"b84fd474df05c64304f86efdd21dc126c707161d"}]}
