)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-04 11:55:42 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the subscription update error in redis backend."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now, when use redis as the storage backend, if users update a"},{"line_number":10,"context_line":"subscription in a queue. It doesn\u0027t check the legality of the new"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5aef4532_56a0b6f4","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":51},"updated":"2016-03-07 19:23:39.000000000","message":"Let\u0027s not use period (\u0027.\u0027) in the end of commit subject line.\n\nAlso I can\u0027t know what \u0027error\u0027 this patch solves from the subject line.\n\nAnd as I know this patch solves two problems.\n\nMaybe you could split this patch to two patches with these commit subject lines:\n1. Forbid update subscription to duplicate in Redis\n2. Renew subscription on update with TTL in Redis","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6ced8f838acf19af6ee230a24e6e9a1cce80c5de","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-04 11:55:42 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the subscription update error in redis backend."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now, when use redis as the storage backend, if users update a"},{"line_number":10,"context_line":"subscription in a queue. It doesn\u0027t check the legality of the new"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5aef4532_49e5a735","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":51},"in_reply_to":"5aef4532_56a0b6f4","updated":"2016-03-08 01:22:37.000000000","message":"Done","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix the subscription update error in redis backend."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now, when use redis as the storage backend, if users update a"},{"line_number":10,"context_line":"subscription in a queue. It doesn\u0027t check the legality of the new"},{"line_number":11,"context_line":"subscriber and the new ttl doesn\u0027t work."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch did:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5aef4532_76d05254","line":10,"range":{"start_line":10,"start_character":23,"end_line":10,"end_character":24},"updated":"2016-03-07 19:23:39.000000000","message":"I think there must be a comma, otherwise it\u0027s incorrect sentense.","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6ced8f838acf19af6ee230a24e6e9a1cce80c5de","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix the subscription update error in redis backend."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now, when use redis as the storage backend, if users update a"},{"line_number":10,"context_line":"subscription in a queue. It doesn\u0027t check the legality of the new"},{"line_number":11,"context_line":"subscriber and the new ttl doesn\u0027t work."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch did:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5aef4532_69e86311","line":10,"range":{"start_line":10,"start_character":23,"end_line":10,"end_character":24},"in_reply_to":"5aef4532_76d05254","updated":"2016-03-08 01:22:37.000000000","message":"Done","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":14,"context_line":"1. add the check of subscriber."},{"line_number":15,"context_line":"2. make the new ttl work."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The functional test will be updated in zaqar client."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-bug: #1545548"},{"line_number":20,"context_line":"Change-Id: I28fe7a114860488c503642417690bf5bfbd99678"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5aef4532_d6da0678","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":52},"updated":"2016-03-07 19:23:39.000000000","message":"You should add unit and functional tests to Zaqar also in this patch.\nSeems like you haven\u0027t tested Zaqar even manually, see my comment in \u0027subscriptions.py\u0027: https://review.openstack.org/#/c/279946/5/zaqar/storage/redis/subscriptions.py@184","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6ced8f838acf19af6ee230a24e6e9a1cce80c5de","unresolved":false,"context_lines":[{"line_number":14,"context_line":"1. add the check of subscriber."},{"line_number":15,"context_line":"2. make the new ttl work."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The functional test will be updated in zaqar client."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-bug: #1545548"},{"line_number":20,"context_line":"Change-Id: I28fe7a114860488c503642417690bf5bfbd99678"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5aef4532_29de5b6d","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":52},"in_reply_to":"5aef4532_d6da0678","updated":"2016-03-08 01:22:37.000000000","message":"Ok， I‘ll take it.","commit_id":"f77fce113bb11f776666802b45b957493cafd420"}],"zaqar/storage/errors.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    msg_format \u003d u\u0027The database URI is in use by another pool.\u0027"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class SubscriberDuplicated(Conflict):"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    msg_format \u003d u\u0027The Subscriber is existed.\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_e7ce7282","line":209,"range":{"start_line":209,"start_character":6,"end_line":209,"end_character":26},"updated":"2016-03-07 19:23:39.000000000","message":"I think SupscriptionAlreadyExists name would be much better.\nExplanation:\nOur subscriptions are unique by project+queue+subscriber. So we can call combination of project+queue+subscriber as subscription. We can have duplicated subscribers, but for different projects/queues and there\u0027s no error.\n\nThere is an error only if all three parameters are duplicated.","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6ced8f838acf19af6ee230a24e6e9a1cce80c5de","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    msg_format \u003d u\u0027The database URI is in use by another pool.\u0027"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class SubscriberDuplicated(Conflict):"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    msg_format \u003d u\u0027The Subscriber is existed.\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_49ef67e8","line":209,"range":{"start_line":209,"start_character":6,"end_line":209,"end_character":26},"in_reply_to":"5aef4532_e7ce7282","updated":"2016-03-08 01:22:37.000000000","message":"Done","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class SubscriberDuplicated(Conflict):"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    msg_format \u003d u\u0027The Subscriber is existed.\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_ea20f74b","line":211,"range":{"start_line":211,"start_character":19,"end_line":211,"end_character":44},"updated":"2016-03-07 19:23:39.000000000","message":"This is grammatically and semantically incorrect.\n\nPerhaps can borrow the description from here: https://github.com/openstack/zaqar/blob/master/zaqar/transport/wsgi/v2_0/subscriptions.py#L198\n;)","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6ced8f838acf19af6ee230a24e6e9a1cce80c5de","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"class SubscriberDuplicated(Conflict):"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    msg_format \u003d u\u0027The Subscriber is existed.\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_69f223d4","line":211,"range":{"start_line":211,"start_character":19,"end_line":211,"end_character":44},"in_reply_to":"5aef4532_ea20f74b","updated":"2016-03-08 01:22:37.000000000","message":"Sorry for my poor English. :(","commit_id":"f77fce113bb11f776666802b45b957493cafd420"}],"zaqar/storage/redis/subscriptions.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                                     pred\u003dlambda x: x is not None,"},{"line_number":183,"context_line":"                                     key_transform\u003dkey_transform)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        new_subscriber \u003d fields.get(\u0027subscriber\u0027, None)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        if new_subscriber and self._is_duplicated_subscriber("},{"line_number":188,"context_line":"                new_subscriber, queue, project):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_9b3a6735","line":185,"range":{"start_line":185,"start_character":36,"end_line":185,"end_character":48},"updated":"2016-03-07 19:23:39.000000000","message":"Unfortunately, there\u0027s no \u0027subscriber\u0027 and no \u0027ttl\u0027 keys in \u0027fields\u0027, so the code doesn\u0027t run correctly.\n\nWhen I update subscription, in debugger I see that \u0027fields\u0027 dict has these keys and example values I entered:\n{\u0027u\u0027: u\u0027http://127.0.0.1:11111\u0027, u\u0027t\u0027: 60, u\u0027o\u0027: {u\u0027status\u0027: u\u0027goodbye!\u0027}}","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6ced8f838acf19af6ee230a24e6e9a1cce80c5de","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                                     pred\u003dlambda x: x is not None,"},{"line_number":183,"context_line":"                                     key_transform\u003dkey_transform)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        new_subscriber \u003d fields.get(\u0027subscriber\u0027, None)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        if new_subscriber and self._is_duplicated_subscriber("},{"line_number":188,"context_line":"                new_subscriber, queue, project):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_89316fa5","line":185,"range":{"start_line":185,"start_character":36,"end_line":185,"end_character":48},"in_reply_to":"5aef4532_9b3a6735","updated":"2016-03-08 01:22:37.000000000","message":"Oh, You are right. it has been transformed to the key in redis. Thanks.","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        new_subscriber \u003d fields.get(\u0027subscriber\u0027, None)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        if new_subscriber and self._is_duplicated_subscriber("},{"line_number":188,"context_line":"                new_subscriber, queue, project):"},{"line_number":189,"context_line":"            raise errors.SubscriberDuplicated()"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_b5ddb444","line":187,"range":{"start_line":187,"start_character":35,"end_line":187,"end_character":60},"updated":"2016-03-07 19:23:39.000000000","message":"Yes, we were in hurry and I think we have chosen not very good name for this method. So I can understand you why you have chosen \"SubscriberDuplicated\" name for the error.","commit_id":"f77fce113bb11f776666802b45b957493cafd420"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"dc176a031474f9c1e8ac1c7435dbbd224b564361","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        new_subscriber \u003d fields.get(\u0027u\u0027, None)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        if new_subscriber and self._is_duplicated_subscriber("},{"line_number":188,"context_line":"                new_subscriber, queue, project):"},{"line_number":189,"context_line":"            raise errors.SubscriptionAlreadyExists()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        assert fields, (\u0027`subscriber`, `ttl`, \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_ae5c2c26","line":188,"range":{"start_line":187,"start_character":8,"end_line":188,"end_character":47},"updated":"2016-03-08 03:54:59.000000000","message":"I think there is a problem. The condition must be more complex.\n\n\u0027new_subscriber\u0027 is not always new for a given \u0027subscription_id\u0027. The subscription with id \u0027subscription_id\u0027 can have the same \u0027subscriber\u0027. We shouldn\u0027t throw SubscriptionAlreadyExists() error in this case.\n\nTo fix this problem, we must get subscription by id, compare it\u0027s \u0027subscriber\u0027 with \u0027new_subscriber\u0027 and then act accordingly.\n\nIf, when we get a subscription by id, we get None, let\u0027s throw errors.SubscriptionDoesNotExist(subscription_id). It\u0027s the desired behavior. As you can see, our MongoDB driver raises this error in such case too. And our transport drivers catches this error.","commit_id":"e43d328d4dd15dfbf82d5495ecd3a73344e980e1"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"deaced43e8a6d819a4f16fa03f1b93a55e2d7d46","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        # Let\u0027s get our subscription by ID. If it does not exist,"},{"line_number":188,"context_line":"        # SubscriptionDoesNotExist error will be raised internally."},{"line_number":189,"context_line":"        subscription_to_update \u003d self.get(queue, subscription_id,"},{"line_number":190,"context_line":"                                          project\u003dproject)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        new_subscriber \u003d fields.get(\u0027u\u0027, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_f8b1ac90","line":189,"updated":"2016-03-08 22:12:59.000000000","message":"Nice.","commit_id":"cc2d489b04710567b5f6a4541f7a2fdde95df757"}],"zaqar/tests/unit/storage/test_impl_redis.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"dc176a031474f9c1e8ac1c7435dbbd224b564361","unresolved":false,"context_lines":[{"line_number":444,"context_line":"    controller_class \u003d controllers.SubscriptionController"},{"line_number":445,"context_line":"    control_driver_class \u003d driver.ControlDriver"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    def test_update_subscription(self):"},{"line_number":448,"context_line":"        # create two subscriptions: fake_0 and fake_1"},{"line_number":449,"context_line":"        ids \u003d []"},{"line_number":450,"context_line":"        for s in six.moves.xrange(2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_0e5f2042","line":447,"updated":"2016-03-08 03:54:59.000000000","message":"I think this test case should be inside base.SubscriptionControllerTest, but, of course, you can\u0027t put it there, because you haven\u0027t fixed MongoDB driver.\n\nI started to write patches for MongoDB solving same problems as your patches (\u0027update to duplicate problem\u0027 and \u0027update TTL problem\u0027) and I noticed that our patches share much code. They depend on each other.\n\nWould you like me to make this patch fix \u0027update to duplicate problem\u0027 also for MongoDB driver? Same for \u0027update TTL problem\u0027 patch. I will provide code for MongoDB and add myself as co-author. ;)","commit_id":"e43d328d4dd15dfbf82d5495ecd3a73344e980e1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"4da32671b90262b7707f8ebfd0becea704509409","unresolved":false,"context_lines":[{"line_number":444,"context_line":"    controller_class \u003d controllers.SubscriptionController"},{"line_number":445,"context_line":"    control_driver_class \u003d driver.ControlDriver"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    def test_update_subscription(self):"},{"line_number":448,"context_line":"        # create two subscriptions: fake_0 and fake_1"},{"line_number":449,"context_line":"        ids \u003d []"},{"line_number":450,"context_line":"        for s in six.moves.xrange(2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_514c2d70","line":447,"in_reply_to":"5aef4532_0e5f2042","updated":"2016-03-08 04:01:09.000000000","message":"Yes, I have noticed that. Feel free to update it. I\u0027m happy about that. And the patch as well: https://review.openstack.org/#/c/289665/\n\n:)","commit_id":"e43d328d4dd15dfbf82d5495ecd3a73344e980e1"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"bbed8da378c3cc40e46057f43da057c62dc9e120","unresolved":false,"context_lines":[{"line_number":444,"context_line":"    controller_class \u003d controllers.SubscriptionController"},{"line_number":445,"context_line":"    control_driver_class \u003d driver.ControlDriver"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    def test_update_subscription(self):"},{"line_number":448,"context_line":"        # create two subscriptions: fake_0 and fake_1"},{"line_number":449,"context_line":"        ids \u003d []"},{"line_number":450,"context_line":"        for s in six.moves.xrange(2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_91d35538","line":447,"in_reply_to":"5aef4532_514c2d70","updated":"2016-03-08 04:06:42.000000000","message":"Nice, let\u0027s make beautiful patches together!","commit_id":"e43d328d4dd15dfbf82d5495ecd3a73344e980e1"}],"zaqar/transport/wsgi/v2_0/subscriptions.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"e25b51d5f9413e4ce82cf1c11bac8430a5fb6370","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            LOG.debug(ex)"},{"line_number":93,"context_line":"            raise wsgi_errors.HTTPNotFound(six.text_type(ex))"},{"line_number":94,"context_line":"        except storage_errors.SubscriberDuplicated as ex:"},{"line_number":95,"context_line":"            LOG.debug(ex)"},{"line_number":96,"context_line":"            raise wsgi_errors.HTTPConflict(six.text_type(ex))"},{"line_number":97,"context_line":"        except validation.ValidationFailed as ex:"},{"line_number":98,"context_line":"            LOG.debug(ex)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_56f39673","line":95,"range":{"start_line":95,"start_character":16,"end_line":95,"end_character":21},"updated":"2016-03-07 19:23:39.000000000","message":"+1 great that you use right logger. \u003d)","commit_id":"f77fce113bb11f776666802b45b957493cafd420"}]}
