)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"a44475d250972555e389ddc3c39037222e924e4b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     feipeng \u003cfeipeng1@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-09 01:57:49 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix Bug #1609604 when there is multi neutron worker ,redis can not write"},{"line_number":8,"context_line":"after redis db cluster master node failed over"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: Icc55f87ede0f751ab1edbf664ed98b240dff9595"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9ad45d7e_8de30e33","line":7,"updated":"2016-08-09 16:23:38.000000000","message":"Add blank line between commit header and commit body.\nHere is nice guide https://wiki.openstack.org/wiki/GitCommitMessages.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     feipeng \u003cfeipeng1@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-09 01:57:49 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix Bug #1609604 when there is multi neutron worker ,redis can not write"},{"line_number":8,"context_line":"after redis db cluster master node failed over"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: Icc55f87ede0f751ab1edbf664ed98b240dff9595"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9ad45d7e_df742d37","line":7,"in_reply_to":"9ad45d7e_8de30e33","updated":"2016-08-11 08:28:57.000000000","message":"The commit message header should be a succinct description of the change, e.g. \"Fix Redis write failure after HA failover\". The current commit message can go in the body, as a more verbose explanation of the change.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"ea41107e7193e75f45eb6f6a41b129528a279269","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     feipeng \u003cfeipeng1@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-09 01:57:49 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix Bug #1609604 when there is multi neutron worker ,redis can not write"},{"line_number":8,"context_line":"after redis db cluster master node failed over"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: Icc55f87ede0f751ab1edbf664ed98b240dff9595"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a95cdbc_46088cda","line":7,"in_reply_to":"9ad45d7e_df742d37","updated":"2016-10-08 07:36:43.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b850a1a66ffbfd21b81e42ecd1cda6abd6cdb604","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                    self.publisher,"},{"line_number":66,"context_line":"                    self.db_recover_callback)"},{"line_number":67,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":68,"context_line":"                self.driver.set_neutron_server(self.is_neutron_server)"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":71,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_3ee7f913","line":68,"updated":"2016-08-14 07:52:35.000000000","message":"This will break non-redis drivers. If you want this, you have to add this method to db_api.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                    self.publisher,"},{"line_number":66,"context_line":"                    self.db_recover_callback)"},{"line_number":67,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":68,"context_line":"                self.driver.set_neutron_server(self.is_neutron_server)"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":71,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_f8152e9b","line":68,"in_reply_to":"3ac371cc_3ee7f913","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f88a7bd740b6e4e2b4d2f5f72b83f76a5159cb05","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    self.publisher,"},{"line_number":84,"context_line":"                    self.db_recover_callback)"},{"line_number":85,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":86,"context_line":"                self.driver.set_neutron_server(self.is_neutron_server)"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":89,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_68d5f341","line":86,"range":{"start_line":86,"start_character":47,"end_line":86,"end_character":69},"updated":"2016-09-14 09:17:41.000000000","message":"why not use True directly??","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"6ed95c0b324808c7ee9b9dbd84e34f7baab115ce","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    self.publisher,"},{"line_number":84,"context_line":"                    self.db_recover_callback)"},{"line_number":85,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":86,"context_line":"                self.driver.set_neutron_server(self.is_neutron_server)"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":89,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_487917fc","line":86,"range":{"start_line":86,"start_character":47,"end_line":86,"end_character":69},"in_reply_to":"7a8ec9b2_68d5f341","updated":"2016-10-08 07:17:44.000000000","message":"keep consistent with self.is_neutron_server","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c8e7956a1602990cf1e8bb7807006eb60b19ae9","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    self.publisher,"},{"line_number":84,"context_line":"                    self.db_recover_callback)"},{"line_number":85,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":86,"context_line":"                self.driver.set_neutron_server(self.is_neutron_server)"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":89,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_d676dda2","line":86,"range":{"start_line":86,"start_character":47,"end_line":86,"end_character":69},"updated":"2016-09-19 08:06:08.000000000","message":"nit: True is more clear here:)","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"909283ac998d29255f23e74656ae02158044292c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    self.publisher,"},{"line_number":84,"context_line":"                    self.db_recover_callback)"},{"line_number":85,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":86,"context_line":"                self.driver.set_neutron_server(self.is_neutron_server)"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":89,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a95cdbc_c6981c7b","line":86,"range":{"start_line":86,"start_character":47,"end_line":86,"end_character":69},"in_reply_to":"7a8ec9b2_d676dda2","updated":"2016-10-08 07:49:43.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"1a37b791ff0fa094eac21873b321ed40b8855c05","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    self.publisher,"},{"line_number":83,"context_line":"                    self.db_recover_callback)"},{"line_number":84,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":85,"context_line":"                self.driver.set_neutron_server(True)"},{"line_number":86,"context_line":"            else:"},{"line_number":87,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":88,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":36,"id":"3a98d1f4_30bb0210","line":85,"range":{"start_line":85,"start_character":16,"end_line":85,"end_character":52},"updated":"2016-09-30 06:11:05.000000000","message":"is it an interface exposed by db api?","commit_id":"68e69fcb86d48450dfe1dce78d6f9942bc26f88a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"4bbf5de4b2efd7c39ba394fc390f2c25a3d89a29","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    self.publisher,"},{"line_number":83,"context_line":"                    self.db_recover_callback)"},{"line_number":84,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":85,"context_line":"                self.driver.set_neutron_server(True)"},{"line_number":86,"context_line":"            else:"},{"line_number":87,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":88,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_064924d0","line":85,"range":{"start_line":85,"start_character":16,"end_line":85,"end_character":52},"in_reply_to":"3a98d1f4_30bb0210","updated":"2016-10-08 08:16:03.000000000","message":"yes，I think I will add it as a db api in other patch","commit_id":"68e69fcb86d48450dfe1dce78d6f9942bc26f88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    self.publisher,"},{"line_number":83,"context_line":"                    self.db_recover_callback)"},{"line_number":84,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":85,"context_line":"                self.driver.set_neutron_server(True)"},{"line_number":86,"context_line":"            else:"},{"line_number":87,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":88,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_8700b235","line":85,"updated":"2016-10-10 11:35:33.000000000","message":"This was still not added to db_api. This patch cannot be merged without it.\n\nIf you prefer, you can add it in a new patch, and then rebase this patch on top of it.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    self.publisher,"},{"line_number":83,"context_line":"                    self.db_recover_callback)"},{"line_number":84,"context_line":"                self.publisher.start_detect_for_failover()"},{"line_number":85,"context_line":"                self.driver.set_neutron_server(True)"},{"line_number":86,"context_line":"            else:"},{"line_number":87,"context_line":"                # NOTE(gampel) we want to start queuing event as soon"},{"line_number":88,"context_line":"                # as possible"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_ba7846fa","line":85,"in_reply_to":"1a95cdbc_8700b235","updated":"2016-10-11 03:43:17.000000000","message":"Done","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"}],"dragonflow/db/drivers/redis_db_driver.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from dragonflow._i18n import _LE, _LW"},{"line_number":14,"context_line":"from dragonflow.db import db_api"},{"line_number":15,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":16,"context_line":"from oslo_log import log"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import re"},{"line_number":19,"context_line":"import redis"},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from redis.exceptions import ("},{"line_number":23,"context_line":"    ConnectionError,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_081471f3","line":20,"range":{"start_line":13,"start_character":0,"end_line":20,"end_character":10},"updated":"2016-08-08 15:18:00.000000000","message":"any reason for change the import order?\nI think we should follow http://docs.openstack.org/developer/hacking/","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from dragonflow._i18n import _LE, _LW"},{"line_number":14,"context_line":"from dragonflow.db import db_api"},{"line_number":15,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":16,"context_line":"from oslo_log import log"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import re"},{"line_number":19,"context_line":"import redis"},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from redis.exceptions import ("},{"line_number":23,"context_line":"    ConnectionError,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_51171b51","line":20,"range":{"start_line":13,"start_character":0,"end_line":20,"end_character":10},"in_reply_to":"9ad45d7e_081471f3","updated":"2016-10-08 07:12:21.000000000","message":"done","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                          % {\u0027key\u0027: local_key})"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _sync_master_list(self):"},{"line_number":75,"context_line":"        LOG.info(_LI(\"_sync_master_list:global_sharedlist.raw %s\")"},{"line_number":76,"context_line":"                 % RedisMgt.global_sharedlist.raw)"},{"line_number":77,"context_line":"        LOG.info(_LI(\"_sync_master_list:new msterlist %s\")"},{"line_number":78,"context_line":"                 % self.redis_mgt.master_list)"},{"line_number":79,"context_line":"        result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_a890c596","line":76,"range":{"start_line":75,"start_character":9,"end_line":76,"end_character":50},"updated":"2016-08-08 15:18:00.000000000","message":"why do we need these two logs together?\nand we should not log the method name","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                          % {\u0027key\u0027: local_key})"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _sync_master_list(self):"},{"line_number":75,"context_line":"        LOG.info(_LI(\"_sync_master_list:global_sharedlist.raw %s\")"},{"line_number":76,"context_line":"                 % RedisMgt.global_sharedlist.raw)"},{"line_number":77,"context_line":"        LOG.info(_LI(\"_sync_master_list:new msterlist %s\")"},{"line_number":78,"context_line":"                 % self.redis_mgt.master_list)"},{"line_number":79,"context_line":"        result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_d1030b0e","line":76,"range":{"start_line":75,"start_character":9,"end_line":76,"end_character":50},"in_reply_to":"9ad45d7e_a890c596","updated":"2016-10-08 07:12:21.000000000","message":"Done","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def _sync_master_list(self):"},{"line_number":75,"context_line":"        LOG.info(_LI(\"_sync_master_list:global_sharedlist.raw %s\")"},{"line_number":76,"context_line":"                 % RedisMgt.global_sharedlist.raw)"},{"line_number":77,"context_line":"        LOG.info(_LI(\"_sync_master_list:new msterlist %s\")"},{"line_number":78,"context_line":"                 % self.redis_mgt.master_list)"},{"line_number":79,"context_line":"        result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":80,"context_line":"            RedisMgt.global_sharedlist.raw)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_68688dbb","line":77,"range":{"start_line":77,"start_character":44,"end_line":77,"end_character":53},"updated":"2016-08-08 15:18:00.000000000","message":"typo","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def _sync_master_list(self):"},{"line_number":75,"context_line":"        LOG.info(_LI(\"_sync_master_list:global_sharedlist.raw %s\")"},{"line_number":76,"context_line":"                 % RedisMgt.global_sharedlist.raw)"},{"line_number":77,"context_line":"        LOG.info(_LI(\"_sync_master_list:new msterlist %s\")"},{"line_number":78,"context_line":"                 % self.redis_mgt.master_list)"},{"line_number":79,"context_line":"        result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":80,"context_line":"            RedisMgt.global_sharedlist.raw)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_95ffbe00","line":77,"range":{"start_line":77,"start_character":44,"end_line":77,"end_character":53},"in_reply_to":"9ad45d7e_68688dbb","updated":"2016-10-08 07:12:21.000000000","message":"Done","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        ttl \u003d self.RequestRetryTimes"},{"line_number":112,"context_line":"        asking \u003d False"},{"line_number":113,"context_line":"        alreadysync \u003d False"},{"line_number":114,"context_line":"        while ttl \u003e 0:"},{"line_number":115,"context_line":"            ttl -\u003d 1"},{"line_number":116,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_9373724d","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":19},"updated":"2016-08-08 15:18:00.000000000","message":"could you just use ttl?","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        ttl \u003d self.RequestRetryTimes"},{"line_number":112,"context_line":"        asking \u003d False"},{"line_number":113,"context_line":"        alreadysync \u003d False"},{"line_number":114,"context_line":"        while ttl \u003e 0:"},{"line_number":115,"context_line":"            ttl -\u003d 1"},{"line_number":116,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_13aae2d4","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":19},"updated":"2016-08-08 15:18:00.000000000","message":"could you rename it?","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        ttl \u003d self.RequestRetryTimes"},{"line_number":112,"context_line":"        asking \u003d False"},{"line_number":113,"context_line":"        alreadysync \u003d False"},{"line_number":114,"context_line":"        while ttl \u003e 0:"},{"line_number":115,"context_line":"            ttl -\u003d 1"},{"line_number":116,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_7504ca14","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":19},"in_reply_to":"9ad45d7e_13aae2d4","updated":"2016-10-08 07:12:21.000000000","message":"no","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        ttl \u003d self.RequestRetryTimes"},{"line_number":112,"context_line":"        asking \u003d False"},{"line_number":113,"context_line":"        alreadysync \u003d False"},{"line_number":114,"context_line":"        while ttl \u003e 0:"},{"line_number":115,"context_line":"            ttl -\u003d 1"},{"line_number":116,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_d509362e","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":19},"in_reply_to":"9ad45d7e_9373724d","updated":"2016-10-08 07:12:21.000000000","message":"different use","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":122,"context_line":"            except ConnectionError as e:"},{"line_number":123,"context_line":"                if not alreadysync:"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":126,"context_line":"                    self._sync_master_list()"},{"line_number":127,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":128,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_73951e3f","line":125,"range":{"start_line":124,"start_character":20,"end_line":125,"end_character":58},"updated":"2016-08-08 15:18:00.000000000","message":"could you re-organize the logs. There are logs before and after _sync_master_list and _sync_master_list contains logs too, we do not need so many logs","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":122,"context_line":"            except ConnectionError as e:"},{"line_number":123,"context_line":"                if not alreadysync:"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":126,"context_line":"                    self._sync_master_list()"},{"line_number":127,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":128,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_95269eb8","line":125,"range":{"start_line":124,"start_character":20,"end_line":125,"end_character":58},"in_reply_to":"9ad45d7e_73951e3f","updated":"2016-10-08 07:12:21.000000000","message":"this is exception ，need more log for debug","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"15e1320e0f4e93c869ff3c0b820557453e68efdb","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":238,"context_line":"                    if len(local_keys) \u003e 0:"},{"line_number":239,"context_line":"                        for tmp_key in local_keys:"},{"line_number":240,"context_line":"                            res.append(self._execute_cmd(\"GET\", tmp_key))"},{"line_number":241,"context_line":"                return res"},{"line_number":242,"context_line":"            except Exception:"},{"line_number":243,"context_line":"                LOG.exception(_LE(\"exception when get_all_entries: \""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_dc09a6de","line":240,"range":{"start_line":240,"start_character":28,"end_line":240,"end_character":73},"updated":"2016-08-07 11:20:51.000000000","message":"Here we will run the self._sync_master_list() each time we run _execute_cmd function.","commit_id":"cfa036fa74d72cf3a059e1005f7dc24f49bfe45e"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a01ce10911eb00fd192ba62ac144aa84be59b178","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":238,"context_line":"                    if len(local_keys) \u003e 0:"},{"line_number":239,"context_line":"                        for tmp_key in local_keys:"},{"line_number":240,"context_line":"                            res.append(self._execute_cmd(\"GET\", tmp_key))"},{"line_number":241,"context_line":"                return res"},{"line_number":242,"context_line":"            except Exception:"},{"line_number":243,"context_line":"                LOG.exception(_LE(\"exception when get_all_entries: \""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_f75f5ce2","line":240,"range":{"start_line":240,"start_character":28,"end_line":240,"end_character":73},"in_reply_to":"bacf61ea_dc09a6de","updated":"2016-10-08 07:14:38.000000000","message":"yes,we do not know when need to sync master list. so,there is a flag in shared memory to decide whether to sync.","commit_id":"cfa036fa74d72cf3a059e1005f7dc24f49bfe45e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"a44475d250972555e389ddc3c39037222e924e4b","unresolved":false,"context_lines":[{"line_number":20,"context_line":")"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from dragonflow._i18n import _LI, _LE, _LW"},{"line_number":24,"context_line":"from dragonflow.db import db_api"},{"line_number":25,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_2d5942ff","line":23,"updated":"2016-08-09 16:23:38.000000000","message":"I think it will be better to split these imports.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":20,"context_line":")"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from dragonflow._i18n import _LI, _LE, _LW"},{"line_number":24,"context_line":"from dragonflow.db import db_api"},{"line_number":25,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_bf72190f","line":23,"in_reply_to":"9ad45d7e_2d5942ff","updated":"2016-08-11 08:28:57.000000000","message":"@Gleb this patter re-appears throughout the project. If this breaks a coding standard, perhaps we should change it in an independent patch specified for this perpouse?","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"25269b58d52628f515ba1782dd54aa2dc4c9a373","unresolved":false,"context_lines":[{"line_number":20,"context_line":")"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from dragonflow._i18n import _LI, _LE, _LW"},{"line_number":24,"context_line":"from dragonflow.db import db_api"},{"line_number":25,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_a6a79009","line":23,"in_reply_to":"9ad45d7e_bf72190f","updated":"2016-10-08 07:27:43.000000000","message":"I keep consistent with other file，if need change I also think it can be done in an independent patch","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"a44475d250972555e389ddc3c39037222e924e4b","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            except ConnectionError as e:"},{"line_number":120,"context_line":"                if not alreadysync:"},{"line_number":121,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":122,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":123,"context_line":"                    self._sync_master_list()"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_8d166eef","line":122,"updated":"2016-08-09 16:23:38.000000000","message":", is better way for string interpolation than %.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            except ConnectionError as e:"},{"line_number":120,"context_line":"                if not alreadysync:"},{"line_number":121,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":122,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":123,"context_line":"                    self._sync_master_list()"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_0011015d","line":122,"in_reply_to":"9ad45d7e_7f53816b","updated":"2016-08-12 08:24:50.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            except ConnectionError as e:"},{"line_number":120,"context_line":"                if not alreadysync:"},{"line_number":121,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":122,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":123,"context_line":"                    self._sync_master_list()"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_7f53816b","line":122,"in_reply_to":"9ad45d7e_8d166eef","updated":"2016-08-11 08:28:57.000000000","message":"@Gleb +1","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"c818f2adfa84d1c79169a497bb74bd6fdc169e0f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":119,"context_line":"            except ConnectionError as e:"},{"line_number":120,"context_line":"                if not alreadysync:"},{"line_number":121,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":122,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":123,"context_line":"                    self._sync_master_list()"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":126,"context_line":"                    alreadysync \u003d True"},{"line_number":127,"context_line":"                    continue"},{"line_number":128,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_8a4c9971","line":125,"range":{"start_line":121,"start_character":0,"end_line":125,"end_character":58},"updated":"2016-08-10 11:30:10.000000000","message":"you can move these logs into _sync_master_list","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":119,"context_line":"            except ConnectionError as e:"},{"line_number":120,"context_line":"                if not alreadysync:"},{"line_number":121,"context_line":"                    LOG.info(_LI(\"redis driver sync old masterlist %s\")"},{"line_number":122,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":123,"context_line":"                    self._sync_master_list()"},{"line_number":124,"context_line":"                    LOG.info(_LI(\"redis driver sync new masterlist %s\")"},{"line_number":125,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":126,"context_line":"                    alreadysync \u003d True"},{"line_number":127,"context_line":"                    continue"},{"line_number":128,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_e0130d63","line":125,"range":{"start_line":121,"start_character":0,"end_line":125,"end_character":58},"in_reply_to":"9ad45d7e_8a4c9971","updated":"2016-08-12 08:24:50.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"80ea9f7554f1c3de16e935594bf030f0572e6712","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            LOG.warning(_LW(\"invalid oper: %(oper)s\")"},{"line_number":111,"context_line":"                        % {\u0027oper\u0027: oper})"},{"line_number":112,"context_line":"            return None"},{"line_number":113,"context_line":"        self._sync_master_list()"},{"line_number":114,"context_line":"        ip_port \u003d self.redis_mgt.get_ip_by_key(local_key)"},{"line_number":115,"context_line":"        client \u003d self._get_client(local_key, ip_port)"},{"line_number":116,"context_line":"        if client is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_65703e73","line":113,"range":{"start_line":113,"start_character":0,"end_line":113,"end_character":32},"updated":"2016-09-13 07:12:31.000000000","message":"You are trying to check the status of redis cluster in proactive way.\n\nIt will add a delay to each execute_cmd()\n\nI advise you just to remove this line.\n\nIn case you have an error running redis command you sync redis cluster which is correct you ypu have this code already in place bellow.","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"2f44fc88ca3c944ef6fe3939a9099ca4b5c8d86a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            LOG.warning(_LW(\"invalid oper: %(oper)s\")"},{"line_number":111,"context_line":"                        % {\u0027oper\u0027: oper})"},{"line_number":112,"context_line":"            return None"},{"line_number":113,"context_line":"        self._sync_master_list()"},{"line_number":114,"context_line":"        ip_port \u003d self.redis_mgt.get_ip_by_key(local_key)"},{"line_number":115,"context_line":"        client \u003d self._get_client(local_key, ip_port)"},{"line_number":116,"context_line":"        if client is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_801d30c0","line":113,"range":{"start_line":113,"start_character":0,"end_line":113,"end_character":32},"in_reply_to":"9a89bdaa_65703e73","updated":"2016-09-13 07:52:08.000000000","message":"yuli, I understand your concerns.but,if you remove this line ,you may successfully run redis command on wrong redis db node if redis cluster get slot change.","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"bb240ac3bcc414c6ecdcdcc859ff982f409b81c7","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def get_key(self, table, key, topic\u003dNone):"},{"line_number":178,"context_line":"        if topic is None:"},{"line_number":179,"context_line":"            local_key \u003d self.uuid_to_key(table, key, \u0027*\u0027)"},{"line_number":180,"context_line":"            self._sync_master_list()"},{"line_number":181,"context_line":"            try:"},{"line_number":182,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":183,"context_line":"                    local_keys \u003d client.keys(local_key)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_65ccbe89","line":180,"updated":"2016-09-13 07:19:13.000000000","message":"Same here, not required","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"2f44fc88ca3c944ef6fe3939a9099ca4b5c8d86a","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def get_key(self, table, key, topic\u003dNone):"},{"line_number":178,"context_line":"        if topic is None:"},{"line_number":179,"context_line":"            local_key \u003d self.uuid_to_key(table, key, \u0027*\u0027)"},{"line_number":180,"context_line":"            self._sync_master_list()"},{"line_number":181,"context_line":"            try:"},{"line_number":182,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":183,"context_line":"                    local_keys \u003d client.keys(local_key)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_60d90cf3","line":180,"in_reply_to":"9a89bdaa_65ccbe89","updated":"2016-09-13 07:52:08.000000000","message":"if you do not sync master list here,may cause do not get all data from DB","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"bb240ac3bcc414c6ecdcdcc859ff982f409b81c7","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                              % {\u0027key\u0027: local_key})"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        else:"},{"line_number":191,"context_line":"            self._sync_master_list()"},{"line_number":192,"context_line":"            local_key \u003d self.uuid_to_key(table, key, topic)"},{"line_number":193,"context_line":"            try:"},{"line_number":194,"context_line":"                # return nil if not found"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_a5c24651","line":191,"updated":"2016-09-13 07:19:13.000000000","message":"Same here, not required.","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"2f44fc88ca3c944ef6fe3939a9099ca4b5c8d86a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                              % {\u0027key\u0027: local_key})"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        else:"},{"line_number":191,"context_line":"            self._sync_master_list()"},{"line_number":192,"context_line":"            local_key \u003d self.uuid_to_key(table, key, topic)"},{"line_number":193,"context_line":"            try:"},{"line_number":194,"context_line":"                # return nil if not found"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_00ce802c","line":191,"in_reply_to":"9a89bdaa_a5c24651","updated":"2016-09-13 07:52:08.000000000","message":"Done","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"bb240ac3bcc414c6ecdcdcc859ff982f409b81c7","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        if topic is None:"},{"line_number":234,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":235,"context_line":"            try:"},{"line_number":236,"context_line":"                self._sync_master_list()"},{"line_number":237,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":238,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":239,"context_line":"                    if len(local_keys) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_05a8528b","line":236,"updated":"2016-09-13 07:19:13.000000000","message":"Same.","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"2f44fc88ca3c944ef6fe3939a9099ca4b5c8d86a","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        if topic is None:"},{"line_number":234,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":235,"context_line":"            try:"},{"line_number":236,"context_line":"                self._sync_master_list()"},{"line_number":237,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":238,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":239,"context_line":"                    if len(local_keys) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a89bdaa_a04874b4","line":236,"in_reply_to":"9a89bdaa_05a8528b","updated":"2016-09-13 07:52:08.000000000","message":"if you do not sync master list here,may cause do not get all data from DB","commit_id":"838c35e7db40590fe7aee5ecfa503b9080edd8f9"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f88a7bd740b6e4e2b4d2f5f72b83f76a5159cb05","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":86,"context_line":"                redis_mgt.RedisMgt.global_sharedlist.raw)"},{"line_number":87,"context_line":"            if result:"},{"line_number":88,"context_line":"                LOG.info(_LI(\"_sync_master_list:new msterlist %s\")"},{"line_number":89,"context_line":"                         % self.redis_mgt.master_list)"},{"line_number":90,"context_line":"                self._update_server_list()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_a8cffbae","line":88,"range":{"start_line":88,"start_character":52,"end_line":88,"end_character":61},"updated":"2016-09-14 09:17:41.000000000","message":"masterlist","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"6ed95c0b324808c7ee9b9dbd84e34f7baab115ce","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":86,"context_line":"                redis_mgt.RedisMgt.global_sharedlist.raw)"},{"line_number":87,"context_line":"            if result:"},{"line_number":88,"context_line":"                LOG.info(_LI(\"_sync_master_list:new msterlist %s\")"},{"line_number":89,"context_line":"                         % self.redis_mgt.master_list)"},{"line_number":90,"context_line":"                self._update_server_list()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_88d15fd0","line":88,"range":{"start_line":88,"start_character":52,"end_line":88,"end_character":61},"in_reply_to":"7a8ec9b2_a8cffbae","updated":"2016-10-08 07:17:44.000000000","message":"Done","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f88a7bd740b6e4e2b4d2f5f72b83f76a5159cb05","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":130,"context_line":"            except ConnectionError as e:"},{"line_number":131,"context_line":"                if not alreadysync:"},{"line_number":132,"context_line":"                    self._sync_master_list()"},{"line_number":133,"context_line":"                    alreadysync \u003d True"},{"line_number":134,"context_line":"                    continue"},{"line_number":135,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":136,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":137,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_683c1394","line":134,"range":{"start_line":131,"start_character":16,"end_line":134,"end_character":28},"updated":"2016-09-14 09:17:41.000000000","message":"why need this logic? you have done the sync_master_list action in line 111","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"6ed95c0b324808c7ee9b9dbd84e34f7baab115ce","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":130,"context_line":"            except ConnectionError as e:"},{"line_number":131,"context_line":"                if not alreadysync:"},{"line_number":132,"context_line":"                    self._sync_master_list()"},{"line_number":133,"context_line":"                    alreadysync \u003d True"},{"line_number":134,"context_line":"                    continue"},{"line_number":135,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":136,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":137,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_a817fb4f","line":134,"range":{"start_line":131,"start_character":16,"end_line":134,"end_character":28},"in_reply_to":"7a8ec9b2_683c1394","updated":"2016-10-08 07:17:44.000000000","message":"try sync again to fix redis connection,it is for reliable","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f88a7bd740b6e4e2b4d2f5f72b83f76a5159cb05","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        if topic is None:"},{"line_number":231,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":232,"context_line":"            try:"},{"line_number":233,"context_line":"                self._sync_master_list()"},{"line_number":234,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":235,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":236,"context_line":"                    if len(local_keys) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_a85d3beb","line":233,"range":{"start_line":233,"start_character":16,"end_line":233,"end_character":40},"updated":"2016-09-14 09:17:41.000000000","message":"why not put this line before line 230 to avoid it appears twice?","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"6ed95c0b324808c7ee9b9dbd84e34f7baab115ce","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        if topic is None:"},{"line_number":231,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":232,"context_line":"            try:"},{"line_number":233,"context_line":"                self._sync_master_list()"},{"line_number":234,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":235,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":236,"context_line":"                    if len(local_keys) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_8b20799d","line":233,"range":{"start_line":233,"start_character":16,"end_line":233,"end_character":40},"in_reply_to":"7a8ec9b2_a85d3beb","updated":"2016-10-08 07:17:44.000000000","message":"to catch exception","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f88a7bd740b6e4e2b4d2f5f72b83f76a5159cb05","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        else:"},{"line_number":246,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, topic)"},{"line_number":247,"context_line":"            try:"},{"line_number":248,"context_line":"                self._sync_master_list()"},{"line_number":249,"context_line":"                ip_port \u003d self.redis_mgt.get_ip_by_key(local_key)"},{"line_number":250,"context_line":"                client \u003d self._get_client(local_key, ip_port)"},{"line_number":251,"context_line":"                if client is None:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_480597c0","line":248,"range":{"start_line":248,"start_character":16,"end_line":248,"end_character":40},"updated":"2016-09-14 09:17:41.000000000","message":"ditto","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"6ed95c0b324808c7ee9b9dbd84e34f7baab115ce","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        else:"},{"line_number":246,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, topic)"},{"line_number":247,"context_line":"            try:"},{"line_number":248,"context_line":"                self._sync_master_list()"},{"line_number":249,"context_line":"                ip_port \u003d self.redis_mgt.get_ip_by_key(local_key)"},{"line_number":250,"context_line":"                client \u003d self._get_client(local_key, ip_port)"},{"line_number":251,"context_line":"                if client is None:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_2b3205f2","line":248,"range":{"start_line":248,"start_character":16,"end_line":248,"end_character":40},"in_reply_to":"7a8ec9b2_480597c0","updated":"2016-10-08 07:17:44.000000000","message":"to catch exception","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f88a7bd740b6e4e2b4d2f5f72b83f76a5159cb05","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        if topic is None:"},{"line_number":267,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":268,"context_line":"            try:"},{"line_number":269,"context_line":"                self._sync_master_list()"},{"line_number":270,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":271,"context_line":"                    ip_port \u003d host"},{"line_number":272,"context_line":"                    res.extend(client.keys(local_key))"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_a8145bf5","line":269,"range":{"start_line":269,"start_character":16,"end_line":269,"end_character":40},"updated":"2016-09-14 09:17:41.000000000","message":"ditto","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"6ed95c0b324808c7ee9b9dbd84e34f7baab115ce","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        if topic is None:"},{"line_number":267,"context_line":"            local_key \u003d self.uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":268,"context_line":"            try:"},{"line_number":269,"context_line":"                self._sync_master_list()"},{"line_number":270,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":271,"context_line":"                    ip_port \u003d host"},{"line_number":272,"context_line":"                    res.extend(client.keys(local_key))"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a8ec9b2_6ba08df5","line":269,"range":{"start_line":269,"start_character":16,"end_line":269,"end_character":40},"in_reply_to":"7a8ec9b2_a8145bf5","updated":"2016-10-08 07:17:44.000000000","message":"to catch exception","commit_id":"92540b7676b744cbb398391c21509632098c91c0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c80f0764d74a483cc05fbba09931cd1962a9820c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":86,"context_line":"                redis_mgt.RedisMgt.global_sharedlist.raw)"},{"line_number":87,"context_line":"            if result:"},{"line_number":88,"context_line":"                LOG.info(_LI(\"_sync_master_list:new masterlist %s\")"},{"line_number":89,"context_line":"                         % self.redis_mgt.master_list)"},{"line_number":90,"context_line":"                self._update_server_list()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_b6a91ce2","line":88,"range":{"start_line":88,"start_character":16,"end_line":88,"end_character":24},"updated":"2016-09-20 00:22:53.000000000","message":"I think it is too verbose as a info level log, and it contains method name. Maybe it should be just a debug level log.","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":86,"context_line":"                redis_mgt.RedisMgt.global_sharedlist.raw)"},{"line_number":87,"context_line":"            if result:"},{"line_number":88,"context_line":"                LOG.info(_LI(\"_sync_master_list:new masterlist %s\")"},{"line_number":89,"context_line":"                         % self.redis_mgt.master_list)"},{"line_number":90,"context_line":"                self._update_server_list()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_1f6ad51a","line":88,"range":{"start_line":88,"start_character":16,"end_line":88,"end_character":24},"in_reply_to":"7a8ec9b2_b6a91ce2","updated":"2016-09-29 08:11:25.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":16983,"name":"Eshed Gal-Or","email":"eshed.galor@huawei.com","username":"eshedg"},"change_message_id":"41247cb2d35e6fd1d2457377eaf7eec071b296e4","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":130,"context_line":"            except ConnectionError as e:"},{"line_number":131,"context_line":"                if not alreadysync:"},{"line_number":132,"context_line":"                    self._sync_master_list()"},{"line_number":133,"context_line":"                    alreadysync \u003d True"},{"line_number":134,"context_line":"                    continue"},{"line_number":135,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":136,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":137,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_76e76d12","line":134,"range":{"start_line":131,"start_character":15,"end_line":134,"end_character":27},"updated":"2016-09-20 13:54:59.000000000","message":"I see you completely removed this code from latest patchset... is that intentionally?\nhujie\u0027s comment was to optimize on the repetition, not completely remove the check...","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c8e7956a1602990cf1e8bb7807006eb60b19ae9","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":130,"context_line":"            except ConnectionError as e:"},{"line_number":131,"context_line":"                if not alreadysync:"},{"line_number":132,"context_line":"                    self._sync_master_list()"},{"line_number":133,"context_line":"                    alreadysync \u003d True"},{"line_number":134,"context_line":"                    continue"},{"line_number":135,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":136,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":137,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_360b8125","line":134,"range":{"start_line":131,"start_character":15,"end_line":134,"end_character":28},"updated":"2016-09-19 08:06:08.000000000","message":"same code appear in multi-places, consider optimize?","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":130,"context_line":"            except ConnectionError as e:"},{"line_number":131,"context_line":"                if not alreadysync:"},{"line_number":132,"context_line":"                    self._sync_master_list()"},{"line_number":133,"context_line":"                    alreadysync \u003d True"},{"line_number":134,"context_line":"                    continue"},{"line_number":135,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":136,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":137,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_4aad7987","line":134,"range":{"start_line":131,"start_character":15,"end_line":134,"end_character":28},"in_reply_to":"7a8ec9b2_360b8125","updated":"2016-09-29 08:11:25.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":130,"context_line":"            except ConnectionError as e:"},{"line_number":131,"context_line":"                if not alreadysync:"},{"line_number":132,"context_line":"                    self._sync_master_list()"},{"line_number":133,"context_line":"                    alreadysync \u003d True"},{"line_number":134,"context_line":"                    continue"},{"line_number":135,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":136,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":137,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_61a149a9","line":134,"range":{"start_line":131,"start_character":15,"end_line":134,"end_character":27},"in_reply_to":"7a8ec9b2_76e76d12","updated":"2016-09-29 08:11:25.000000000","message":"this code just try to sync master list when exception. I think it is not need any more. sync master list is done at beginning","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"3d9a40b3a12477aa5c66a9998ae7992705d8b593","unresolved":false,"context_lines":[{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def process_ha(self):"},{"line_number":346,"context_line":"        if self.is_neutron_server:"},{"line_number":347,"context_line":"            result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":348,"context_line":"                redis_mgt.RedisMgt.global_sharedlist.raw)"},{"line_number":349,"context_line":"            if result:"},{"line_number":350,"context_line":"                self._update_server_list()"},{"line_number":351,"context_line":"        else:"},{"line_number":352,"context_line":"            self._update_server_list()"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"5a8bc5a2_7101e4ae","line":350,"range":{"start_line":347,"start_character":0,"end_line":350,"end_character":42},"updated":"2016-09-26 11:17:32.000000000","message":"why not _sync_master_list","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d70daf74705a6080e610b52e6095bc0c7b21c412","unresolved":false,"context_lines":[{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def process_ha(self):"},{"line_number":346,"context_line":"        if self.is_neutron_server:"},{"line_number":347,"context_line":"            result \u003d self.redis_mgt.redis_get_master_list_from_syncstring("},{"line_number":348,"context_line":"                redis_mgt.RedisMgt.global_sharedlist.raw)"},{"line_number":349,"context_line":"            if result:"},{"line_number":350,"context_line":"                self._update_server_list()"},{"line_number":351,"context_line":"        else:"},{"line_number":352,"context_line":"            self._update_server_list()"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_d8fec76a","line":350,"range":{"start_line":347,"start_character":0,"end_line":350,"end_character":42},"in_reply_to":"5a8bc5a2_7101e4ae","updated":"2016-09-29 08:11:12.000000000","message":"Done","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"08b7d3ba719bd82395be8e34917f1812620a3079","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                    asking \u003d False"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"                return client.execute_command(oper, *arg)"},{"line_number":127,"context_line":"            except ConnectionError as e:"},{"line_number":128,"context_line":"                self._handle_db_conn_error(ip_port, local_key)"},{"line_number":129,"context_line":"                LOG.exception(_LE(\"connection error while sending \""},{"line_number":130,"context_line":"                                  \"request to db: %(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_5b9471e1","line":127,"range":{"start_line":127,"start_character":18,"end_line":127,"end_character":40},"updated":"2016-09-29 08:06:10.000000000","message":"@ Eshed ,the code I delete at patch 28 just try to sync master list when exception. I think it is not need any more. sync master list is done at beginning","commit_id":"25486de6c839ecbbc1fd7d80f631a6b88668589b"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"1a37b791ff0fa094eac21873b321ed40b8855c05","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        else:"},{"line_number":343,"context_line":"            return None"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def process_ha(self):"},{"line_number":346,"context_line":"        if self.is_neutron_server:"},{"line_number":347,"context_line":"            self._sync_master_list()"},{"line_number":348,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":36,"id":"3a98d1f4_301782ee","line":345,"range":{"start_line":345,"start_character":8,"end_line":345,"end_character":18},"updated":"2016-09-30 06:11:05.000000000","message":"i don\u0027t know why it was merged before. it is not a db api interface.","commit_id":"68e69fcb86d48450dfe1dce78d6f9942bc26f88a"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"1a37b791ff0fa094eac21873b321ed40b8855c05","unresolved":false,"context_lines":[{"line_number":354,"context_line":"    def unregister_topic_for_notification(self, topic):"},{"line_number":355,"context_line":"        pass"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def set_neutron_server(self, is_neutron_server):"},{"line_number":358,"context_line":"        self.is_neutron_server \u003d is_neutron_server"}],"source_content_type":"text/x-python","patch_set":36,"id":"3a98d1f4_70d74a23","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":26},"updated":"2016-09-30 06:11:05.000000000","message":"it is not a db api interface.","commit_id":"68e69fcb86d48450dfe1dce78d6f9942bc26f88a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"e24b1176ab52f3ec19c7b379b0549ecfac6863ba","unresolved":false,"context_lines":[{"line_number":354,"context_line":"    def unregister_topic_for_notification(self, topic):"},{"line_number":355,"context_line":"        pass"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def set_neutron_server(self, is_neutron_server):"},{"line_number":358,"context_line":"        self.is_neutron_server \u003d is_neutron_server"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_8982a5c6","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":26},"in_reply_to":"3a98d1f4_70d74a23","updated":"2016-10-08 09:12:20.000000000","message":"I will add db api for this interface","commit_id":"68e69fcb86d48450dfe1dce78d6f9942bc26f88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            LOG.warning(_LW(\"invalid oper: %(oper)s\")"},{"line_number":104,"context_line":"                        % {\u0027oper\u0027: oper})"},{"line_number":105,"context_line":"            return None"},{"line_number":106,"context_line":"        self._sync_master_list()"},{"line_number":107,"context_line":"        ip_port \u003d self.redis_mgt.get_ip_by_key(local_key)"},{"line_number":108,"context_line":"        client \u003d self._get_client(local_key, ip_port)"},{"line_number":109,"context_line":"        if client is None:"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_0aef471e","line":106,"updated":"2016-10-10 11:35:33.000000000","message":"@feipeng @yuli continuing the discussion from PS19.\n\n@feipeng The error can be detected - Redis sends a message.\n@yuli Did you run performance tests with this patch? Does it really slow the system down?","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            LOG.warning(_LW(\"invalid oper: %(oper)s\")"},{"line_number":104,"context_line":"                        % {\u0027oper\u0027: oper})"},{"line_number":105,"context_line":"            return None"},{"line_number":106,"context_line":"        self._sync_master_list()"},{"line_number":107,"context_line":"        ip_port \u003d self.redis_mgt.get_ip_by_key(local_key)"},{"line_number":108,"context_line":"        client \u003d self._get_client(local_key, ip_port)"},{"line_number":109,"context_line":"        if client is None:"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_cb2b6a32","line":106,"in_reply_to":"1a95cdbc_0aef471e","updated":"2016-10-11 03:43:17.000000000","message":"yes omer, I test in my local env, redis will send a erro message, but it will cost an erro access to db .whatever I change the code. I think read from shared memory is not a slow way.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        if topic is None:"},{"line_number":213,"context_line":"            local_key \u003d self._uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":214,"context_line":"            try:"},{"line_number":215,"context_line":"                self._sync_master_list()"},{"line_number":216,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":217,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":218,"context_line":"                    if len(local_keys) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_0acd8730","line":215,"updated":"2016-10-10 11:35:33.000000000","message":"\u003e hujie: why not put this line before line 230 to avoid it appears twice?\n\u003e feipeng: to catch exception\n\n@feipeng _sync_master_list is called elsewhere without exception handling. What exceptions can it throw? I read through the code and it looks safe.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        if topic is None:"},{"line_number":213,"context_line":"            local_key \u003d self._uuid_to_key(table, \u0027*\u0027, \u0027*\u0027)"},{"line_number":214,"context_line":"            try:"},{"line_number":215,"context_line":"                self._sync_master_list()"},{"line_number":216,"context_line":"                for host, client in six.iteritems(self.clients):"},{"line_number":217,"context_line":"                    local_keys \u003d client.keys(local_key)"},{"line_number":218,"context_line":"                    if len(local_keys) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_55545b53","line":215,"in_reply_to":"1a95cdbc_0acd8730","updated":"2016-10-11 03:43:17.000000000","message":"Done","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"}],"dragonflow/db/drivers/redis_mgt.py":[{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"4256757af833da5d8edb64d79ad74dfe3f83e799","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    def run(self):"},{"line_number":363,"context_line":"        while True:"},{"line_number":364,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":365,"context_line":"            eventlet.sleep(3)"},{"line_number":366,"context_line":"            try:"},{"line_number":367,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":368,"context_line":"                if len(nodes) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_e1576524","line":365,"range":{"start_line":365,"start_character":27,"end_line":365,"end_character":28},"updated":"2016-08-03 04:47:23.000000000","message":"why not sleep 3 and the remark should be modified","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    def run(self):"},{"line_number":363,"context_line":"        while True:"},{"line_number":364,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":365,"context_line":"            eventlet.sleep(3)"},{"line_number":366,"context_line":"            try:"},{"line_number":367,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":368,"context_line":"                if len(nodes) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_912233b8","line":365,"range":{"start_line":365,"start_character":27,"end_line":365,"end_character":28},"in_reply_to":"bacf61ea_e1576524","updated":"2016-10-08 07:12:21.000000000","message":"for efficient","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                  \"when receive messages from plugin, \""},{"line_number":381,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_28821501","line":383,"range":{"start_line":383,"start_character":4,"end_line":383,"end_character":64},"updated":"2016-08-08 15:18:00.000000000","message":"could you change syncstring to sync_string or something else?","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                  \"when receive messages from plugin, \""},{"line_number":381,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_b15e5743","line":383,"range":{"start_line":383,"start_character":4,"end_line":383,"end_character":64},"in_reply_to":"9ad45d7e_28821501","updated":"2016-10-08 07:12:21.000000000","message":"no need","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"b6a3e336d8a98b0a14fb3ae79dde8a237a0aabc0","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_68cecd84","line":385,"range":{"start_line":385,"start_character":12,"end_line":385,"end_character":27},"updated":"2016-08-08 15:18:00.000000000","message":"unused","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"62627f89befaf940aaa5458e37f01c09befffe1a","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_f158cf58","line":385,"range":{"start_line":385,"start_character":12,"end_line":385,"end_character":27},"in_reply_to":"9ad45d7e_68cecd84","updated":"2016-10-08 07:12:21.000000000","message":"see below code","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from dragonflow.db.drivers import redis_calckey"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo_log import log"},{"line_number":29,"context_line":"from oslo_serialization import jsonutils"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_da1b9b71","line":29,"updated":"2016-08-11 08:28:57.000000000","message":"Please keep cosmetic changes to a dedicated patch.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from dragonflow.db.drivers import redis_calckey"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo_log import log"},{"line_number":29,"context_line":"from oslo_serialization import jsonutils"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_c065291e","line":29,"in_reply_to":"9ad45d7e_da1b9b71","updated":"2016-08-12 08:24:50.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"f5a0307a2343619cf8cdc7a562480eefc3b81172","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        changed \u003d self._check_nodes_change(self.cluster_nodes, new_nodes)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        if changed \u003d\u003d RET_CODE.SLOTS_CHANGE:"},{"line_number":314,"context_line":"            LOG.info(_LI(\"redis_failover_callback:SLOTS_CHANGE\"))"},{"line_number":315,"context_line":"            # update local nodes"},{"line_number":316,"context_line":"            # don\u0027t need re-sync"},{"line_number":317,"context_line":"            self.cluster_nodes \u003d new_nodes"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_543492dc","line":314,"range":{"start_line":314,"start_character":50,"end_line":314,"end_character":62},"updated":"2016-08-11 12:12:22.000000000","message":"I think lower case is more readable","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        changed \u003d self._check_nodes_change(self.cluster_nodes, new_nodes)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        if changed \u003d\u003d RET_CODE.SLOTS_CHANGE:"},{"line_number":314,"context_line":"            LOG.info(_LI(\"redis_failover_callback:SLOTS_CHANGE\"))"},{"line_number":315,"context_line":"            # update local nodes"},{"line_number":316,"context_line":"            # don\u0027t need re-sync"},{"line_number":317,"context_line":"            self.cluster_nodes \u003d new_nodes"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_c04c09a0","line":314,"range":{"start_line":314,"start_character":50,"end_line":314,"end_character":62},"in_reply_to":"9ad45d7e_543492dc","updated":"2016-08-12 08:24:50.000000000","message":"I think it is ok for a redis failover","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        changed \u003d self._check_nodes_change(self.cluster_nodes, new_nodes)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        if changed \u003d\u003d RET_CODE.SLOTS_CHANGE:"},{"line_number":314,"context_line":"            LOG.info(_LI(\"redis_failover_callback:SLOTS_CHANGE\"))"},{"line_number":315,"context_line":"            # update local nodes"},{"line_number":316,"context_line":"            # don\u0027t need re-sync"},{"line_number":317,"context_line":"            self.cluster_nodes \u003d new_nodes"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_2264b720","line":314,"range":{"start_line":314,"start_character":50,"end_line":314,"end_character":62},"in_reply_to":"9ad45d7e_543492dc","updated":"2016-10-08 07:14:58.000000000","message":"upper case is marked","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_1ad2535c","line":385,"updated":"2016-08-11 08:28:57.000000000","message":"You don\u0027t need to declare local_list here.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_0267fb25","line":385,"in_reply_to":"9ad45d7e_1ad2535c","updated":"2016-10-08 07:14:58.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            local_list \u003d []"},{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_5b8da8d1","line":385,"in_reply_to":"9ad45d7e_1ad2535c","updated":"2016-08-12 08:24:50.000000000","message":"but I think it is ok, right ?","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":389,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":390,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":391,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":392,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":393,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":394,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":395,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":396,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":397,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":398,"context_line":"                         % self.master_list)"},{"line_number":399,"context_line":"                LOG.info(_LI(\"changed syncstring %s\")"},{"line_number":400,"context_line":"                         % syncstring)"},{"line_number":401,"context_line":"                return True"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                return False"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_9a748368","line":401,"range":{"start_line":389,"start_character":0,"end_line":401,"end_character":27},"updated":"2016-08-11 08:28:57.000000000","message":"Why not use an existing serialization library? e.g. msgpack?","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":389,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":390,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":391,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":392,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":393,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":394,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":395,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":396,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":397,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":398,"context_line":"                         % self.master_list)"},{"line_number":399,"context_line":"                LOG.info(_LI(\"changed syncstring %s\")"},{"line_number":400,"context_line":"                         % syncstring)"},{"line_number":401,"context_line":"                return True"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                return False"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_3bdef4dc","line":401,"range":{"start_line":389,"start_character":0,"end_line":401,"end_character":27},"in_reply_to":"9ad45d7e_9a748368","updated":"2016-08-12 08:24:50.000000000","message":"is this need a serialization ?","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"a736a58e3f518516a9939d0ee2c0585cd9c61792","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":389,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":390,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":391,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":392,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":393,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":394,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":395,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":396,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":397,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":398,"context_line":"                         % self.master_list)"},{"line_number":399,"context_line":"                LOG.info(_LI(\"changed syncstring %s\")"},{"line_number":400,"context_line":"                         % syncstring)"},{"line_number":401,"context_line":"                return True"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                return False"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_5bf6485d","line":401,"range":{"start_line":389,"start_character":0,"end_line":401,"end_character":27},"in_reply_to":"9ad45d7e_9a748368","updated":"2016-08-12 08:24:50.000000000","message":"is this need a serialization? only for process communication","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            LOG.info(_LI(\"get new master from syncstring \u003d %s\")"},{"line_number":387,"context_line":"                     % syncstring)"},{"line_number":388,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":389,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":390,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":391,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":392,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":393,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":394,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":395,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":396,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":397,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":398,"context_line":"                         % self.master_list)"},{"line_number":399,"context_line":"                LOG.info(_LI(\"changed syncstring %s\")"},{"line_number":400,"context_line":"                         % syncstring)"},{"line_number":401,"context_line":"                return True"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                return False"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_626eaf02","line":401,"range":{"start_line":389,"start_character":0,"end_line":401,"end_character":27},"in_reply_to":"9ad45d7e_9a748368","updated":"2016-10-08 07:14:58.000000000","message":"yes, but I tried, seem pack and unpack can not be used for c_char multiprocessing.Array.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"21eafea9080cf49ff45c5d02de0a9a3fac5d8e73","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":366,"context_line":"                if len(nodes) \u003e 0:"},{"line_number":367,"context_line":"                    #LOG.info(\"run: nodes:%s\", nodes)"},{"line_number":368,"context_line":"                    if self.publisher is not None:"},{"line_number":369,"context_line":"                        nodes_json \u003d jsonutils.dumps(nodes)"},{"line_number":370,"context_line":"                        update \u003d DbUpdate(\u0027ha\u0027, \u0027nodes\u0027, \u0027set\u0027, nodes_json,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_0d92d59f","line":367,"range":{"start_line":367,"start_character":0,"end_line":367,"end_character":53},"updated":"2016-08-12 09:05:47.000000000","message":"do not comment the code. you can remove it safely.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":366,"context_line":"                if len(nodes) \u003e 0:"},{"line_number":367,"context_line":"                    #LOG.info(\"run: nodes:%s\", nodes)"},{"line_number":368,"context_line":"                    if self.publisher is not None:"},{"line_number":369,"context_line":"                        nodes_json \u003d jsonutils.dumps(nodes)"},{"line_number":370,"context_line":"                        update \u003d DbUpdate(\u0027ha\u0027, \u0027nodes\u0027, \u0027set\u0027, nodes_json,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_ff49d18f","line":367,"range":{"start_line":367,"start_character":0,"end_line":367,"end_character":53},"in_reply_to":"9ad45d7e_0d92d59f","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b850a1a66ffbfd21b81e42ecd1cda6abd6cdb604","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            local_list \u003d []"},{"line_number":385,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":386,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":387,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_7e1a1119","line":384,"updated":"2016-08-14 07:52:35.000000000","message":"local_list shouldn\u0027t be declared here. While it doesn\u0027t break the code, the following issues arise:\n1. It adds lines of code which do nothing. This makes the code more difficult to read and maintain, and more bug-prone.\n2. Despite doing nothing, this method costs CPU and memory resources, since it has to create a new list and a new local variable (one of which will definitely not be used, and one of which may not be used).\n\nPlease remove this line.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            local_list \u003d []"},{"line_number":385,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":386,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":387,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_028c1b34","line":384,"in_reply_to":"3ac371cc_7e1a1119","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"21eafea9080cf49ff45c5d02de0a9a3fac5d8e73","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            local_list \u003d []"},{"line_number":385,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":386,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":387,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":388,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":389,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":390,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":391,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":392,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":393,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":394,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":395,"context_line":"                         % self.master_list)"},{"line_number":396,"context_line":"                RedisMgt.global_sharedlist.raw \u003d syncstring"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_6d4a7157","line":393,"range":{"start_line":385,"start_character":12,"end_line":393,"end_character":57},"updated":"2016-08-12 09:05:47.000000000","message":"at least, it is suggested to abstract the string manipulation to a dedicated private function.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            local_list \u003d []"},{"line_number":385,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":386,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":387,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":388,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":389,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":390,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":391,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":392,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":393,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":394,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":395,"context_line":"                         % self.master_list)"},{"line_number":396,"context_line":"                RedisMgt.global_sharedlist.raw \u003d syncstring"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_625b4f88","line":393,"range":{"start_line":385,"start_character":12,"end_line":393,"end_character":57},"in_reply_to":"3ac371cc_fedc4148","updated":"2016-10-08 07:15:37.000000000","message":"yes, but I tried, seem pack and unpack can not be used for c_char multiprocessing.Array.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b850a1a66ffbfd21b81e42ecd1cda6abd6cdb604","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            local_list \u003d []"},{"line_number":385,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":386,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":387,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":388,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":389,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":390,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":391,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":392,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":393,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":394,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":395,"context_line":"                         % self.master_list)"},{"line_number":396,"context_line":"                RedisMgt.global_sharedlist.raw \u003d syncstring"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_fedc4148","line":393,"range":{"start_line":385,"start_character":12,"end_line":393,"end_character":57},"in_reply_to":"9ad45d7e_6d4a7157","updated":"2016-08-14 07:52:35.000000000","message":"@FeiPeng, turning a list into a string and back into a list is in effect serialization.\n@LiMa: +1. This should be abstracted.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            local_list \u003d []"},{"line_number":385,"context_line":"            index_start \u003d syncstring[0]"},{"line_number":386,"context_line":"            if index_start \u003d\u003d \u0027Y\u0027:"},{"line_number":387,"context_line":"                index_end \u003d syncstring.find(\u0027}]\u0027)"},{"line_number":388,"context_line":"                str_local \u003d syncstring[2:index_end + 1]"},{"line_number":389,"context_line":"                str_local_tmp \u003d str_local.replace(\u0027]},\u0027, \u0027]},a\u0027)"},{"line_number":390,"context_line":"                local_list \u003d str_local_tmp.split(\",a \")"},{"line_number":391,"context_line":"                local_list \u003d [eval(node) for node in local_list]"},{"line_number":392,"context_line":"                self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":393,"context_line":"                syncstring \u003d syncstring.replace(\u0027Y\u0027, \u0027N\u0027)"},{"line_number":394,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":395,"context_line":"                         % self.master_list)"},{"line_number":396,"context_line":"                RedisMgt.global_sharedlist.raw \u003d syncstring"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_2261573a","line":393,"range":{"start_line":385,"start_character":12,"end_line":393,"end_character":57},"in_reply_to":"9ad45d7e_6d4a7157","updated":"2016-10-08 07:15:37.000000000","message":"yes, but I tried, seem pack and unpack can not be used for c_char multiprocessing.Array.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"16ac358e66227fed63d6ac000ea57342e65263b8","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":395,"context_line":"                         % self.master_list)"},{"line_number":396,"context_line":"                RedisMgt.global_sharedlist.raw \u003d syncstring"},{"line_number":397,"context_line":"                LOG.info(_LI(\"changed syncstring %s\")"},{"line_number":398,"context_line":"                         % RedisMgt.global_sharedlist.raw)"},{"line_number":399,"context_line":"                return True"},{"line_number":400,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_24dc0b46","line":397,"range":{"start_line":397,"start_character":38,"end_line":397,"end_character":48},"updated":"2016-08-12 12:12:18.000000000","message":"change syncstring from %s to %s can supply more information","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":395,"context_line":"                         % self.master_list)"},{"line_number":396,"context_line":"                RedisMgt.global_sharedlist.raw \u003d syncstring"},{"line_number":397,"context_line":"                LOG.info(_LI(\"changed syncstring %s\")"},{"line_number":398,"context_line":"                         % RedisMgt.global_sharedlist.raw)"},{"line_number":399,"context_line":"                return True"},{"line_number":400,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_22a2f7ae","line":397,"range":{"start_line":397,"start_character":38,"end_line":397,"end_character":48},"in_reply_to":"9ad45d7e_24dc0b46","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"16ac358e66227fed63d6ac000ea57342e65263b8","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    def redis_set_master_list_to_syncstring(self, master_list):"},{"line_number":409,"context_line":"        try:"},{"line_number":410,"context_line":"            RedisMgt.global_sharedlist.raw \u003d \u0027Y\u0027 + str(master_list)"},{"line_number":411,"context_line":"            LOG.info(_LI(\"set new master to syncstring master_list %s\")"},{"line_number":412,"context_line":"                     % master_list)"},{"line_number":413,"context_line":"            LOG.info(_LI(\"set new master to syncstring syncstring %s\")"},{"line_number":414,"context_line":"                     % RedisMgt.global_sharedlist.raw)"},{"line_number":415,"context_line":"        except Exception as e:"},{"line_number":416,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":417,"context_line":"                              \"when set new master from syncstring, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_84e33733","line":414,"range":{"start_line":411,"start_character":12,"end_line":414,"end_character":54},"updated":"2016-08-12 12:12:18.000000000","message":"you can merge these two statements.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    def redis_set_master_list_to_syncstring(self, master_list):"},{"line_number":409,"context_line":"        try:"},{"line_number":410,"context_line":"            RedisMgt.global_sharedlist.raw \u003d \u0027Y\u0027 + str(master_list)"},{"line_number":411,"context_line":"            LOG.info(_LI(\"set new master to syncstring master_list %s\")"},{"line_number":412,"context_line":"                     % master_list)"},{"line_number":413,"context_line":"            LOG.info(_LI(\"set new master to syncstring syncstring %s\")"},{"line_number":414,"context_line":"                     % RedisMgt.global_sharedlist.raw)"},{"line_number":415,"context_line":"        except Exception as e:"},{"line_number":416,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":417,"context_line":"                              \"when set new master from syncstring, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_62acefa0","line":414,"range":{"start_line":411,"start_character":12,"end_line":414,"end_character":54},"in_reply_to":"9ad45d7e_84e33733","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"16ac358e66227fed63d6ac000ea57342e65263b8","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                     % RedisMgt.global_sharedlist.raw)"},{"line_number":415,"context_line":"        except Exception as e:"},{"line_number":416,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":417,"context_line":"                              \"when set new master from syncstring, \""},{"line_number":418,"context_line":"                              \"%(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_64c3a38b","line":417,"range":{"start_line":417,"start_character":51,"end_line":417,"end_character":55},"updated":"2016-08-12 12:12:18.000000000","message":"to","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                     % RedisMgt.global_sharedlist.raw)"},{"line_number":415,"context_line":"        except Exception as e:"},{"line_number":416,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":417,"context_line":"                              \"when set new master from syncstring, \""},{"line_number":418,"context_line":"                              \"%(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_42af3394","line":417,"range":{"start_line":417,"start_character":51,"end_line":417,"end_character":55},"in_reply_to":"9ad45d7e_64c3a38b","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9d3b62b7676102b8ff7a7ac8cc19851175450553","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                  \"when receive messages from plugin, \""},{"line_number":381,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            if syncstring:"},{"line_number":386,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_a723af04","line":383,"range":{"start_line":383,"start_character":52,"end_line":383,"end_character":62},"updated":"2016-09-14 07:56:46.000000000","message":"Why not take syncstring from the RedisMgt.global_sharedlist.raw like in redis_set_master_list_to_syncstring?\n\nI think it would be event better to pass global_sharedlist to both functions.","commit_id":"7781217522508e62cc86e08d74a26e63ac3b962f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"3cad88ff71385d0d72df0decfc777dd455c4d3bd","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                  \"when receive messages from plugin, \""},{"line_number":381,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            if syncstring:"},{"line_number":386,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_f8a0f8a7","line":383,"range":{"start_line":383,"start_character":52,"end_line":383,"end_character":62},"in_reply_to":"7a8ec9b2_a723af04","updated":"2016-10-08 07:15:57.000000000","message":"redis_get_master_list_from_syncstring input param is RedisMgt.global_sharedlist.raw\n\nI think it may be not a must change,right","commit_id":"7781217522508e62cc86e08d74a26e63ac3b962f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9d3b62b7676102b8ff7a7ac8cc19851175450553","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            if syncstring:"},{"line_number":386,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"},{"line_number":387,"context_line":"                if local_list:"},{"line_number":388,"context_line":"                    self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":389,"context_line":"                    LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":390,"context_line":"                             % self.master_list)"},{"line_number":391,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_87d153fe","line":388,"updated":"2016-09-14 07:56:46.000000000","message":"copy.deepcopy is not needed here. msgpack.Unpacker creates a new object.","commit_id":"7781217522508e62cc86e08d74a26e63ac3b962f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"3cad88ff71385d0d72df0decfc777dd455c4d3bd","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            if syncstring:"},{"line_number":386,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"},{"line_number":387,"context_line":"                if local_list:"},{"line_number":388,"context_line":"                    self.master_list \u003d copy.deepcopy(local_list)"},{"line_number":389,"context_line":"                    LOG.info(_LI(\"get new master from syncstring master\u003d%s\")"},{"line_number":390,"context_line":"                             % self.master_list)"},{"line_number":391,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_024c4e6f","line":388,"in_reply_to":"7a8ec9b2_87d153fe","updated":"2016-10-08 07:15:57.000000000","message":"Done","commit_id":"7781217522508e62cc86e08d74a26e63ac3b962f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9d3b62b7676102b8ff7a7ac8cc19851175450553","unresolved":false,"context_lines":[{"line_number":395,"context_line":"        except Exception as e:"},{"line_number":396,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":397,"context_line":"                              \"when get new master from syncstring, \""},{"line_number":398,"context_line":"                              \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    def redis_set_master_list_to_syncstring(self, master_list):"},{"line_number":401,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_072b83ec","line":398,"updated":"2016-09-14 07:56:46.000000000","message":"Delay string format into LOG.exception, i.e. don\u0027t use %, but pass the parameters to LOG.exceptions.\n\nAdditionally, you don\u0027t need to pass the exception. LOG.exception prints it out by default.","commit_id":"7781217522508e62cc86e08d74a26e63ac3b962f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"3cad88ff71385d0d72df0decfc777dd455c4d3bd","unresolved":false,"context_lines":[{"line_number":395,"context_line":"        except Exception as e:"},{"line_number":396,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":397,"context_line":"                              \"when get new master from syncstring, \""},{"line_number":398,"context_line":"                              \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    def redis_set_master_list_to_syncstring(self, master_list):"},{"line_number":401,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_22494a60","line":398,"in_reply_to":"7a8ec9b2_072b83ec","updated":"2016-10-08 07:15:57.000000000","message":"Done","commit_id":"7781217522508e62cc86e08d74a26e63ac3b962f"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c8e7956a1602990cf1e8bb7807006eb60b19ae9","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def run(self):"},{"line_number":361,"context_line":"        while True:"},{"line_number":362,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":363,"context_line":"            eventlet.sleep(3)"},{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_3b436c14","line":362,"range":{"start_line":362,"start_character":48,"end_line":362,"end_character":50},"updated":"2016-09-19 08:06:08.000000000","message":"3","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def run(self):"},{"line_number":361,"context_line":"        while True:"},{"line_number":362,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":363,"context_line":"            eventlet.sleep(3)"},{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_cae6e9e7","line":362,"range":{"start_line":362,"start_character":48,"end_line":362,"end_character":50},"in_reply_to":"7a8ec9b2_3b436c14","updated":"2016-09-29 08:11:25.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c8e7956a1602990cf1e8bb7807006eb60b19ae9","unresolved":false,"context_lines":[{"line_number":360,"context_line":"    def run(self):"},{"line_number":361,"context_line":"        while True:"},{"line_number":362,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":363,"context_line":"            eventlet.sleep(3)"},{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":366,"context_line":"                if len(nodes) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_bb669cb8","line":363,"range":{"start_line":363,"start_character":27,"end_line":363,"end_character":28},"updated":"2016-09-19 08:06:08.000000000","message":"consider use constant??","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d779e645ba78b7375a7c41d1d6daf448588def5f","unresolved":false,"context_lines":[{"line_number":360,"context_line":"    def run(self):"},{"line_number":361,"context_line":"        while True:"},{"line_number":362,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":363,"context_line":"            eventlet.sleep(3)"},{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":366,"context_line":"                if len(nodes) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_f8fca773","line":363,"range":{"start_line":363,"start_character":27,"end_line":363,"end_character":28},"in_reply_to":"7a8ec9b2_bb669cb8","updated":"2016-09-19 08:36:10.000000000","message":"A configuration option may be even better.","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":360,"context_line":"    def run(self):"},{"line_number":361,"context_line":"        while True:"},{"line_number":362,"context_line":"            # fetch cluster topology info every 10 sec"},{"line_number":363,"context_line":"            eventlet.sleep(3)"},{"line_number":364,"context_line":"            try:"},{"line_number":365,"context_line":"                nodes \u003d self.get_cluster_topology_by_all_nodes()"},{"line_number":366,"context_line":"                if len(nodes) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_eaeba5ae","line":363,"range":{"start_line":363,"start_character":27,"end_line":363,"end_character":28},"in_reply_to":"7a8ec9b2_f8fca773","updated":"2016-09-29 08:11:25.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d779e645ba78b7375a7c41d1d6daf448588def5f","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                                  \"when receive messages from plugin, \""},{"line_number":380,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            if syncstring:"},{"line_number":385,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_9843a3ae","line":382,"updated":"2016-09-19 08:36:10.000000000","message":"You didn\u0027t update the API. Please at least give your opinion on the matter.","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                                  \"when receive messages from plugin, \""},{"line_number":380,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            if syncstring:"},{"line_number":385,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_aa643d49","line":382,"in_reply_to":"7a8ec9b2_9843a3ae","updated":"2016-09-29 08:11:25.000000000","message":"yes, I just think this function have one param same as redis_set_master_list_to_syncstring","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d779e645ba78b7375a7c41d1d6daf448588def5f","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        try:"},{"line_number":401,"context_line":"            RedisMgt.global_sharedlist.raw \u003d msgpack.packb(master_list)"},{"line_number":402,"context_line":"        except Exception as e:"},{"line_number":403,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":404,"context_line":"                              \"when set new master to syncstring, \""},{"line_number":405,"context_line":"                              \"%(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_b82dbfff","line":405,"range":{"start_line":403,"start_character":0,"end_line":405,"end_character":50},"updated":"2016-09-19 08:36:10.000000000","message":"Same here as per % in LOG, and passing exception to LOG.exception.","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d5ffd92be53a6efb45968fff62757e62b2cf7654","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        try:"},{"line_number":401,"context_line":"            RedisMgt.global_sharedlist.raw \u003d msgpack.packb(master_list)"},{"line_number":402,"context_line":"        except Exception as e:"},{"line_number":403,"context_line":"            LOG.exception(_LE(\"exception happened \""},{"line_number":404,"context_line":"                              \"when set new master to syncstring, \""},{"line_number":405,"context_line":"                              \"%(e)s\") % {\u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_ca598990","line":405,"range":{"start_line":403,"start_character":0,"end_line":405,"end_character":50},"in_reply_to":"7a8ec9b2_b82dbfff","updated":"2016-09-29 08:11:25.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import redis"},{"line_number":22,"context_line":"import six"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from ctypes import c_char"},{"line_number":25,"context_line":"from dragonflow._i18n import _LI, _LE, _LW"},{"line_number":26,"context_line":"from dragonflow.common import utils as df_utils"},{"line_number":27,"context_line":"from dragonflow.db import db_common"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_9ea7220a","line":24,"updated":"2016-10-10 11:35:33.000000000","message":"Please import only modules, not objects.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import redis"},{"line_number":22,"context_line":"import six"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from ctypes import c_char"},{"line_number":25,"context_line":"from dragonflow._i18n import _LI, _LE, _LW"},{"line_number":26,"context_line":"from dragonflow.common import utils as df_utils"},{"line_number":27,"context_line":"from dragonflow.db import db_common"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_b0bb050e","line":24,"in_reply_to":"1a95cdbc_9ea7220a","updated":"2016-10-11 03:43:17.000000000","message":"Done","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                  \"when receive messages from plugin\""},{"line_number":381,"context_line":"                                  ))"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            if syncstring:"},{"line_number":386,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_4a378f4c","line":383,"range":{"start_line":383,"start_character":52,"end_line":383,"end_character":62},"updated":"2016-10-10 11:35:33.000000000","message":"\u003e Omer Anson\n14. Sep 10:56\n\n\u003e Why not take syncstring from the RedisMgt.global_sharedlist.raw like in redis_set_master_list_to_syncstring?\n\n\u003e I think it would be event better to pass global_sharedlist to both functions.\n\u003e feipeng\n8. Oct 10:15\n\n\u003e redis_get_master_list_from_syncstring input param is RedisMgt.global_sharedlist.raw\n\n\u003e I think it may be not a must change,right\n\nSure, not a must. Can be left as-is (unless someone else objects)","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                  \"when receive messages from plugin\""},{"line_number":381,"context_line":"                                  ))"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def redis_get_master_list_from_syncstring(self, syncstring):"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            if syncstring:"},{"line_number":386,"context_line":"                local_list \u003d msgpack.Unpacker(six.BytesIO(syncstring)).unpack()"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_30f8d5e5","line":383,"range":{"start_line":383,"start_character":52,"end_line":383,"end_character":62},"in_reply_to":"1a95cdbc_4a378f4c","updated":"2016-10-11 03:43:17.000000000","message":"thx omer","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"}],"dragonflow/db/pubsub_drivers/redis_db_pubsub_driver.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"c818f2adfa84d1c79169a497bb74bd6fdc169e0f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from dragonflow._i18n import _LE, _LI, _LW"},{"line_number":16,"context_line":"from dragonflow.common import common_params"},{"line_number":17,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":18,"context_line":"from dragonflow.db import pub_sub_api"},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_317b308e","line":18,"range":{"start_line":15,"start_character":0,"end_line":18,"end_character":37},"updated":"2016-08-10 11:30:10.000000000","message":"import order","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from dragonflow._i18n import _LE, _LI, _LW"},{"line_number":16,"context_line":"from dragonflow.common import common_params"},{"line_number":17,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":18,"context_line":"from dragonflow.db import pub_sub_api"},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_423f33d6","line":18,"range":{"start_line":15,"start_character":0,"end_line":18,"end_character":37},"in_reply_to":"9ad45d7e_317b308e","updated":"2016-10-08 07:14:58.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import redis"},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"eventlet.monkey_patch()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"cfg.CONF.register_opts(common_params.df_opts, \u0027df\u0027)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_9afbe3c0","line":26,"updated":"2016-08-11 08:28:57.000000000","message":"I think this is already called upon process creation.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import redis"},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"eventlet.monkey_patch()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"cfg.CONF.register_opts(common_params.df_opts, \u0027df\u0027)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_623cefe2","line":26,"in_reply_to":"9ad45d7e_9afbe3c0","updated":"2016-10-08 07:14:58.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                    break"},{"line_number":100,"context_line":"            except Exception as e:"},{"line_number":101,"context_line":"                if not alreadysync:"},{"line_number":102,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":103,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":104,"context_line":"                    self._sync_master_list()"},{"line_number":105,"context_line":"                    LOG.info(_LI(\"publish connection mew masterlist %s\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_9aa5a3a3","line":102,"updated":"2016-08-11 08:28:57.000000000","message":"Same here re: moving logs into sync_master_list.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                    break"},{"line_number":100,"context_line":"            except Exception as e:"},{"line_number":101,"context_line":"                if not alreadysync:"},{"line_number":102,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":103,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":104,"context_line":"                    self._sync_master_list()"},{"line_number":105,"context_line":"                    LOG.info(_LI(\"publish connection mew masterlist %s\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_c22b2393","line":102,"in_reply_to":"9ad45d7e_9aa5a3a3","updated":"2016-10-08 07:14:58.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                    alreadysync \u003d True"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                LOG.exception(_LE(\"publish connection get exception \""},{"line_number":110,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"},{"line_number":113,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_fae3ffd6","line":110,"range":{"start_line":110,"start_character":0,"end_line":110,"end_character":54},"updated":"2016-08-11 08:28:57.000000000","message":"You don\u0027t need to manually add the exception to the string when using LOG.exception.","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                    alreadysync \u003d True"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                LOG.exception(_LE(\"publish connection get exception \""},{"line_number":110,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"},{"line_number":113,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_021c1b76","line":110,"range":{"start_line":110,"start_character":0,"end_line":110,"end_character":54},"in_reply_to":"9ad45d7e_fae3ffd6","updated":"2016-10-08 07:14:58.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                    if self.client is not None:"},{"line_number":115,"context_line":"                        self.client.publish(local_topic, data)"},{"line_number":116,"context_line":"                except Exception:"},{"line_number":117,"context_line":"                    self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":118,"context_line":"                    self._update_client()"},{"line_number":119,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s\")"},{"line_number":120,"context_line":"                                  % {\u0027remote\u0027: self.remote})"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_1a2d33fe","line":117,"updated":"2016-08-11 08:28:57.000000000","message":"I am not sure I understand what\u0027s going on here. You repeat the loop body within the loop?","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                    if self.client is not None:"},{"line_number":115,"context_line":"                        self.client.publish(local_topic, data)"},{"line_number":116,"context_line":"                except Exception:"},{"line_number":117,"context_line":"                    self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":118,"context_line":"                    self._update_client()"},{"line_number":119,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s\")"},{"line_number":120,"context_line":"                                  % {\u0027remote\u0027: self.remote})"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_fd77e09c","line":117,"in_reply_to":"9ad45d7e_1a2d33fe","updated":"2016-10-08 07:14:58.000000000","message":"it is deleted now","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"16ac358e66227fed63d6ac000ea57342e65263b8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from dragonflow._i18n import _LE, _LI, _LW"},{"line_number":16,"context_line":"from dragonflow.common import common_params"},{"line_number":17,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":18,"context_line":"from dragonflow.db import pub_sub_api"},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_84721748","line":18,"range":{"start_line":15,"start_character":0,"end_line":18,"end_character":37},"updated":"2016-08-12 12:12:18.000000000","message":"the convention is to import third-party module firstly.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from dragonflow._i18n import _LE, _LI, _LW"},{"line_number":16,"context_line":"from dragonflow.common import common_params"},{"line_number":17,"context_line":"from dragonflow.db.drivers.redis_mgt import RedisMgt"},{"line_number":18,"context_line":"from dragonflow.db import pub_sub_api"},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_0aa46d55","line":18,"range":{"start_line":15,"start_character":0,"end_line":18,"end_character":37},"in_reply_to":"9ad45d7e_84721748","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"21eafea9080cf49ff45c5d02de0a9a3fac5d8e73","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import redis"},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"eventlet.monkey_patch()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"cfg.CONF.register_opts(common_params.df_opts, \u0027df\u0027)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_8d9ec5b6","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":23},"updated":"2016-08-12 09:05:47.000000000","message":"it is initialized during the process start.\nplease remove it.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import redis"},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"eventlet.monkey_patch()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"cfg.CONF.register_opts(common_params.df_opts, \u0027df\u0027)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_ca99b521","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":23},"in_reply_to":"9ad45d7e_8d9ec5b6","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"16ac358e66227fed63d6ac000ea57342e65263b8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                    alreadysync \u003d True"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                LOG.exception(_LE(\"publish connection get exception \""},{"line_number":110,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"},{"line_number":113,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_84733715","line":110,"range":{"start_line":110,"start_character":34,"end_line":110,"end_character":53},"updated":"2016-08-12 12:12:18.000000000","message":"i think this is not needed. LOG.exception will print the exception by default.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                    alreadysync \u003d True"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                LOG.exception(_LE(\"publish connection get exception \""},{"line_number":110,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"},{"line_number":113,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_4aff8534","line":110,"range":{"start_line":110,"start_character":34,"end_line":110,"end_character":53},"in_reply_to":"9ad45d7e_84733715","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"16ac358e66227fed63d6ac000ea57342e65263b8","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"},{"line_number":113,"context_line":"                try:"},{"line_number":114,"context_line":"                    if self.client is not None:"},{"line_number":115,"context_line":"                        self.client.publish(local_topic, data)"},{"line_number":116,"context_line":"                except Exception:"},{"line_number":117,"context_line":"                    self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":118,"context_line":"                    self._update_client()"},{"line_number":119,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s\")"},{"line_number":120,"context_line":"                                  % {\u0027remote\u0027: self.remote})"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def set_publisher_for_failover(self, pub, callback):"},{"line_number":123,"context_line":"        self.redis_mgt.set_publisher(pub, callback)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_047107e1","line":120,"range":{"start_line":113,"start_character":0,"end_line":120,"end_character":60},"updated":"2016-08-12 12:12:18.000000000","message":"this section can be removed, because the while loop will do the same thing.","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"12f111b0f35829cbab1748942d92155cd180154d","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                  \"%(e)s\") % {\u0027e\u0027: e})"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"},{"line_number":113,"context_line":"                try:"},{"line_number":114,"context_line":"                    if self.client is not None:"},{"line_number":115,"context_line":"                        self.client.publish(local_topic, data)"},{"line_number":116,"context_line":"                except Exception:"},{"line_number":117,"context_line":"                    self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":118,"context_line":"                    self._update_client()"},{"line_number":119,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s\")"},{"line_number":120,"context_line":"                                  % {\u0027remote\u0027: self.remote})"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def set_publisher_for_failover(self, pub, callback):"},{"line_number":123,"context_line":"        self.redis_mgt.set_publisher(pub, callback)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_8af97d50","line":120,"range":{"start_line":113,"start_character":0,"end_line":120,"end_character":60},"in_reply_to":"9ad45d7e_047107e1","updated":"2016-10-08 07:15:37.000000000","message":"Done","commit_id":"c5acd7071c7b6457e27165bc6b5455c92c27f69c"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"65cb379c9fa9cee4415e08586b6917f82d9ba3c5","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":103,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":104,"context_line":"                    self._sync_master_list()"},{"line_number":105,"context_line":"                    LOG.info(_LI(\"publish connection mew masterlist %s\")"},{"line_number":106,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":107,"context_line":"                    alreadysync \u003d True"},{"line_number":108,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a89bdaa_149b2667","line":105,"range":{"start_line":105,"start_character":53,"end_line":105,"end_character":54},"updated":"2016-09-13 06:03:23.000000000","message":"mew \u003d\u003e new","commit_id":"7da48de5963ea5bbf3011047e138855c7c1b02af"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c80f0764d74a483cc05fbba09931cd1962a9820c","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class RedisPublisherAgent(pub_sub_api.PublisherApi):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    PublishRetryTimes \u003d 5"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self):"},{"line_number":51,"context_line":"        super(RedisPublisherAgent, self).__init__()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_d63948da","line":48,"range":{"start_line":48,"start_character":4,"end_line":48,"end_character":21},"updated":"2016-09-20 00:22:53.000000000","message":"Try to use lowercase， or else it looks like a class name","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"95ef8539153e55e13c66ed767b08aa1993e0b677","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class RedisPublisherAgent(pub_sub_api.PublisherApi):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    PublishRetryTimes \u003d 5"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self):"},{"line_number":51,"context_line":"        super(RedisPublisherAgent, self).__init__()"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a95cdbc_a69b1065","line":48,"range":{"start_line":48,"start_character":4,"end_line":48,"end_character":21},"in_reply_to":"7a8ec9b2_d63948da","updated":"2016-10-08 07:52:36.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c80f0764d74a483cc05fbba09931cd1962a9820c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":102,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection mew masterlist %s\")"},{"line_number":105,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_d6406838","line":104,"range":{"start_line":104,"start_character":53,"end_line":104,"end_character":56},"updated":"2016-09-20 00:22:53.000000000","message":"new?","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"95ef8539153e55e13c66ed767b08aa1993e0b677","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":102,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection mew masterlist %s\")"},{"line_number":105,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""}],"source_content_type":"text/x-python","patch_set":28,"id":"1a95cdbc_c6a65cad","line":104,"range":{"start_line":104,"start_character":53,"end_line":104,"end_character":56},"in_reply_to":"7a8ec9b2_d6406838","updated":"2016-10-08 07:52:36.000000000","message":"Done","commit_id":"51a9eed3cc162d1904846377ed0775d0c1ba47a0"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"3d9a40b3a12477aa5c66a9998ae7992705d8b593","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        local_topic \u003d update.topic"},{"line_number":89,"context_line":"        local_topic \u003d local_topic.encode(\u0027utf8\u0027)"},{"line_number":90,"context_line":"        data \u003d pub_sub_api.pack_message(update.to_dict())"},{"line_number":91,"context_line":"        ttl \u003d self.publishretrytimes"},{"line_number":92,"context_line":"        alreadysync \u003d False"},{"line_number":93,"context_line":"        while ttl \u003e 0:"},{"line_number":94,"context_line":"            ttl -\u003d 1"}],"source_content_type":"text/x-python","patch_set":34,"id":"5a8bc5a2_31ccbc69","line":91,"range":{"start_line":91,"start_character":19,"end_line":91,"end_character":36},"updated":"2016-09-26 11:17:32.000000000","message":"typo","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d70daf74705a6080e610b52e6095bc0c7b21c412","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        local_topic \u003d update.topic"},{"line_number":89,"context_line":"        local_topic \u003d local_topic.encode(\u0027utf8\u0027)"},{"line_number":90,"context_line":"        data \u003d pub_sub_api.pack_message(update.to_dict())"},{"line_number":91,"context_line":"        ttl \u003d self.publishretrytimes"},{"line_number":92,"context_line":"        alreadysync \u003d False"},{"line_number":93,"context_line":"        while ttl \u003e 0:"},{"line_number":94,"context_line":"            ttl -\u003d 1"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_982b5feb","line":91,"range":{"start_line":91,"start_character":19,"end_line":91,"end_character":36},"in_reply_to":"5a8bc5a2_31ccbc69","updated":"2016-09-29 08:11:12.000000000","message":"Done","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"05083b304054ee5a491fbca05d3937fa0352a899","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            except Exception as e:"},{"line_number":100,"context_line":"                if not alreadysync:"},{"line_number":101,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":102,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection new masterlist %s\")"},{"line_number":105,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":34,"id":"5a8bc5a2_4719a2d6","line":102,"range":{"start_line":102,"start_character":29,"end_line":102,"end_character":30},"updated":"2016-09-25 08:28:53.000000000","message":"Please consider to use , instead of %","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d70daf74705a6080e610b52e6095bc0c7b21c412","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            except Exception as e:"},{"line_number":100,"context_line":"                if not alreadysync:"},{"line_number":101,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\")"},{"line_number":102,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection new masterlist %s\")"},{"line_number":105,"context_line":"                             % self.redis_mgt.master_list)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_d8e8877f","line":102,"range":{"start_line":102,"start_character":29,"end_line":102,"end_character":30},"in_reply_to":"5a8bc5a2_4719a2d6","updated":"2016-09-29 08:11:12.000000000","message":"Done","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"05083b304054ee5a491fbca05d3937fa0352a899","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection new masterlist %s\")"},{"line_number":105,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""},{"line_number":108,"context_line":"                                      \"%(e)s\")"}],"source_content_type":"text/x-python","patch_set":34,"id":"5a8bc5a2_670a1e7b","line":105,"range":{"start_line":105,"start_character":29,"end_line":105,"end_character":30},"updated":"2016-09-25 08:28:53.000000000","message":"Same here","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d70daf74705a6080e610b52e6095bc0c7b21c412","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection new masterlist %s\")"},{"line_number":105,"context_line":"                             % self.redis_mgt.master_list)"},{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""},{"line_number":108,"context_line":"                                      \"%(e)s\")"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_1803cf43","line":105,"range":{"start_line":105,"start_character":29,"end_line":105,"end_character":30},"in_reply_to":"5a8bc5a2_670a1e7b","updated":"2016-09-29 08:11:12.000000000","message":"Done","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"05083b304054ee5a491fbca05d3937fa0352a899","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""},{"line_number":108,"context_line":"                                      \"%(e)s\")"},{"line_number":109,"context_line":"                                  % {\u0027remote\u0027: self.remote, \u0027e\u0027: e})"},{"line_number":110,"context_line":"                    continue"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"}],"source_content_type":"text/x-python","patch_set":34,"id":"5a8bc5a2_870f2a87","line":109,"range":{"start_line":109,"start_character":34,"end_line":109,"end_character":35},"updated":"2016-09-25 08:28:53.000000000","message":"Same here","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d70daf74705a6080e610b52e6095bc0c7b21c412","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""},{"line_number":108,"context_line":"                                      \"%(e)s\")"},{"line_number":109,"context_line":"                                  % {\u0027remote\u0027: self.remote, \u0027e\u0027: e})"},{"line_number":110,"context_line":"                    continue"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_38008b34","line":109,"range":{"start_line":109,"start_character":34,"end_line":109,"end_character":35},"in_reply_to":"5a8bc5a2_870f2a87","updated":"2016-09-29 08:11:12.000000000","message":"Done","commit_id":"d0aaf6d26f99c5583f028bf7c9fb9d6b1db6b26a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class RedisPublisherAgent(pub_sub_api.PublisherApi):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    publishertrytimes \u003d 5"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self):"},{"line_number":51,"context_line":"        super(RedisPublisherAgent, self).__init__()"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_6a0feb36","line":48,"updated":"2016-10-10 11:35:33.000000000","message":"I think the intention was to rename to publish_retry_times.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class RedisPublisherAgent(pub_sub_api.PublisherApi):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    publishertrytimes \u003d 5"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self):"},{"line_number":51,"context_line":"        super(RedisPublisherAgent, self).__init__()"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_1512e362","line":48,"in_reply_to":"1a95cdbc_6a0feb36","updated":"2016-10-11 03:43:17.000000000","message":"Done","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                    break"},{"line_number":99,"context_line":"            except Exception as e:"},{"line_number":100,"context_line":"                if not alreadysync:"},{"line_number":101,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\"),"},{"line_number":102,"context_line":"                             self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection new masterlist %s\"),"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_1e723211","line":101,"updated":"2016-10-10 11:35:33.000000000","message":"\u003e Same here re: moving logs into sync_master_list.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                    break"},{"line_number":99,"context_line":"            except Exception as e:"},{"line_number":100,"context_line":"                if not alreadysync:"},{"line_number":101,"context_line":"                    LOG.info(_LI(\"publish connection old masterlist %s\"),"},{"line_number":102,"context_line":"                             self.redis_mgt.master_list)"},{"line_number":103,"context_line":"                    self._sync_master_list()"},{"line_number":104,"context_line":"                    LOG.info(_LI(\"publish connection new masterlist %s\"),"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_b03145ef","line":101,"in_reply_to":"1a95cdbc_1e723211","updated":"2016-10-11 03:43:17.000000000","message":"Done","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b0a106f41359e5ae4e94a1323349421add5d30a9","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""},{"line_number":108,"context_line":"                                      \"%(e)s\"),"},{"line_number":109,"context_line":"                                  {\u0027remote\u0027: self.remote, \u0027e\u0027: e})"},{"line_number":110,"context_line":"                    continue"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"}],"source_content_type":"text/x-python","patch_set":40,"id":"1a95cdbc_3e7c4eeb","line":109,"updated":"2016-10-10 11:35:33.000000000","message":"\u003e You don\u0027t need to manually add the exception to the string when using LOG.exception.","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"d35be566e1ca46cd8a7d19f27a5771b66bfd14a6","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    alreadysync \u003d True"},{"line_number":107,"context_line":"                    LOG.exception(_LE(\"publish error remote:%(remote)s \""},{"line_number":108,"context_line":"                                      \"%(e)s\"),"},{"line_number":109,"context_line":"                                  {\u0027remote\u0027: self.remote, \u0027e\u0027: e})"},{"line_number":110,"context_line":"                    continue"},{"line_number":111,"context_line":"                self.redis_mgt.remove_node_from_master_list(self.remote)"},{"line_number":112,"context_line":"                self._update_client()"}],"source_content_type":"text/x-python","patch_set":40,"id":"fa6399be_d04cf978","line":109,"in_reply_to":"1a95cdbc_3e7c4eeb","updated":"2016-10-11 03:43:17.000000000","message":"Done","commit_id":"3296d8aab007a7160d8ccb6f4344ca052cae44a6"}],"dragonflow/tests/unit/test_redis_db.py":[{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"4256757af833da5d8edb64d79ad74dfe3f83e799","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from dragonflow.db.drivers.redis_db_driver import RedisDbDriver"},{"line_number":17,"context_line":"from dragonflow.tests import base as tests_base"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class TestRedisDB(tests_base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_01f2796f","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":11},"updated":"2016-08-03 04:47:23.000000000","message":"What does it mean to another location","commit_id":"0e4e74e1595e7188be639e4a1ececa391752c89a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"c818f2adfa84d1c79169a497bb74bd6fdc169e0f","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from dragonflow.db.drivers.redis_db_driver import RedisDbDriver"},{"line_number":17,"context_line":"from dragonflow.tests import base as tests_base"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class TestRedisDB(tests_base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_91a3fcff","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":11},"updated":"2016-08-10 11:30:10.000000000","message":"why move it down?","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"603c0669472e25fb79094c824d0b66632fa7fb4f","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from dragonflow.db.drivers.redis_db_driver import RedisDbDriver"},{"line_number":17,"context_line":"from dragonflow.tests import base as tests_base"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class TestRedisDB(tests_base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_3da978e0","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":11},"in_reply_to":"9ad45d7e_84438941","updated":"2016-10-08 07:14:58.000000000","message":"Done","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5c4cf614f18cfd9bf17f4b9737169be07ff2e309","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from dragonflow.db.drivers.redis_db_driver import RedisDbDriver"},{"line_number":17,"context_line":"from dragonflow.tests import base as tests_base"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class TestRedisDB(tests_base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_84438941","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":11},"in_reply_to":"9ad45d7e_91a3fcff","updated":"2016-08-11 08:28:57.000000000","message":"@Wangjian, imports should be in lexicographical order. However, his change should be in a separate patch (With the cosmetic changes from other files.)","commit_id":"17f030edbae0c92ab5540efe680e56f35ba10149"}]}
