)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"7c1200d3c9bf8f45760c1ba9e0fe43be76274a80","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a websocket connection is closed, we need to cleanup 2 things:"},{"line_number":10,"context_line":"protocol instance which are tracked by the websocket factory, and"},{"line_number":11,"context_line":"subscriptions which may have been created by the connection."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4c21fad979a42518c5b319aa6e4bc4c6b485b872"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7aa08908_bf44d1b6","line":12,"updated":"2016-06-08 09:10:03.000000000","message":"Can you add a bug id here? https://bugs.launchpad.net/zaqar/+bug/1590112","commit_id":"2d2fee15d87f42d363a5b6ebaf35dee252343671"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"d43aef3f5fd32ddf4c5ccbc34f7fb6217cd44593","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a websocket connection is closed, we need to cleanup 2 things:"},{"line_number":10,"context_line":"protocol instance which are tracked by the websocket factory, and"},{"line_number":11,"context_line":"subscriptions which may have been created by the connection."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1590112"},{"line_number":14,"context_line":"Change-Id: I4c21fad979a42518c5b319aa6e4bc4c6b485b872"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_e21b99c8","line":11,"updated":"2016-06-12 02:12:33.000000000","message":"I have two questions:\nWhy we need clean the subscriptions at once? Can we connect again and then delete them?\n\nWhat about other resources which were created by the connection?","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"0545e441c16a546a9356a2da1779c2c8980ff140","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a websocket connection is closed, we need to cleanup 2 things:"},{"line_number":10,"context_line":"protocol instance which are tracked by the websocket factory, and"},{"line_number":11,"context_line":"subscriptions which may have been created by the connection."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1590112"},{"line_number":14,"context_line":"Change-Id: I4c21fad979a42518c5b319aa6e4bc4c6b485b872"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_3395f5e3","line":11,"in_reply_to":"7aa08908_53ea41ad","updated":"2016-06-12 07:15:53.000000000","message":"Thanks for the explanation.","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"b5ab64e206ae9a4f08e8a6883fba714a60da13a5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a websocket connection is closed, we need to cleanup 2 things:"},{"line_number":10,"context_line":"protocol instance which are tracked by the websocket factory, and"},{"line_number":11,"context_line":"subscriptions which may have been created by the connection."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1590112"},{"line_number":14,"context_line":"Change-Id: I4c21fad979a42518c5b319aa6e4bc4c6b485b872"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_53ea41ad","line":11,"in_reply_to":"7aa08908_e21b99c8","updated":"2016-06-12 06:52:54.000000000","message":"\u003e Why we need clean the subscriptions at once? Can we connect again and then delete them?\n\nSure, but would you know which one to delete? We\u0027d need to keep that information somewhere, whereas it\u0027s right there at disconnection time.\n\n\u003e What about other resources which were created by the connection?\n\nThis issue is only relevant for websocket subscriptions (without a specified subscriber), because that subscription is useless once the websocket connection is over. Other resources need to stay.","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"}],"zaqar/api/handler.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"3fd4792ab143c85fe8f8a6ea99184874e2383a9e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                    \u0027subscription_id\u0027: resp._body.get(\u0027subscription_id\u0027)}"},{"line_number":51,"context_line":"            payload \u003d {\u0027body\u0027: body, \u0027headers\u0027: resp._request._headers}"},{"line_number":52,"context_line":"            req \u003d self.create_request(payload)"},{"line_number":53,"context_line":"            self.v2_endpoints.subscription_delete(req)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def process_request(self, req, protocol):"},{"line_number":56,"context_line":"        # FIXME(vkmc): Control API version"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_729bf066","line":53,"updated":"2016-06-15 21:26:40.000000000","message":"Could/Should we add a debug log at here since we(zaqar) are deleting subscriptions that are not requested by end user directly?","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"ad218da005d0cd03e925c4996e34e760cd8b058c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                    \u0027subscription_id\u0027: resp._body.get(\u0027subscription_id\u0027)}"},{"line_number":51,"context_line":"            payload \u003d {\u0027body\u0027: body, \u0027headers\u0027: resp._request._headers}"},{"line_number":52,"context_line":"            req \u003d self.create_request(payload)"},{"line_number":53,"context_line":"            self.v2_endpoints.subscription_delete(req)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def process_request(self, req, protocol):"},{"line_number":56,"context_line":"        # FIXME(vkmc): Control API version"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_a5261266","line":53,"in_reply_to":"7aa08908_729bf066","updated":"2016-06-20 14:24:31.000000000","message":"We have the log for subscription_delete just after, so I think that\u0027s fine.","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"}],"zaqar/transport/websocket/protocol.py":[{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"0545e441c16a546a9356a2da1779c2c8980ff140","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        return self._send_response(resp, isBinary)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def onClose(self, wasClean, code, reason):"},{"line_number":143,"context_line":"        LOG.info(_LI(\"WebSocket connection closed: %s\"), reason)"},{"line_number":144,"context_line":"        self._handler.clean_subscriptions(self._subscriptions)"},{"line_number":145,"context_line":"        self.factory.unregister(self.proto_id)"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_736dbd03","line":143,"range":{"start_line":143,"start_character":7,"end_line":143,"end_character":64},"updated":"2016-06-12 07:15:53.000000000","message":"this line should behind L144-145 IMO. We should log the close message after everything is down.","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"ad218da005d0cd03e925c4996e34e760cd8b058c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        return self._send_response(resp, isBinary)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def onClose(self, wasClean, code, reason):"},{"line_number":143,"context_line":"        LOG.info(_LI(\"WebSocket connection closed: %s\"), reason)"},{"line_number":144,"context_line":"        self._handler.clean_subscriptions(self._subscriptions)"},{"line_number":145,"context_line":"        self.factory.unregister(self.proto_id)"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_e5201a4c","line":143,"range":{"start_line":143,"start_character":7,"end_line":143,"end_character":64},"in_reply_to":"7aa08908_736dbd03","updated":"2016-06-20 14:24:31.000000000","message":"Done","commit_id":"84729e10bf7c24aa76f84386aabce920cfcd0661"}]}
