)]}'
{"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"41fd59f306d4c30eff177dd8275cb37efb3db586","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                self.nb_api.register_notification_callback(self)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def run_sync(self, mode\u003dNone):"},{"line_number":130,"context_line":"        if mode \u003d\u003d \u0027full_sync\u0027:"},{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_b91c8fc2","line":134,"range":{"start_line":130,"start_character":0,"end_line":134,"end_character":33},"updated":"2016-10-05 16:26:46.000000000","message":"I think we may need to remove the stale flow as well. But it seems not easy","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":20405,"name":"liuhaixia","email":"liuhaixia315@huawei.com","username":"liuhaixia"},"change_message_id":"d05c5a422708c5ff33ee7b8fd67ce7cefb48a6d4","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_54b11746","line":134,"range":{"start_line":134,"start_character":10,"end_line":134,"end_character":33},"updated":"2016-10-08 03:12:14.000000000","message":"If just openflow connection was lost, I don\u0027t think it\u0027s necessary to clear db_store and re-read switches and ports etc. from dragonflow db.","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a57a947ce4b842f47287ce583c782adbe9269c8a","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_4c08abda","line":134,"range":{"start_line":134,"start_character":10,"end_line":134,"end_character":33},"in_reply_to":"1a95cdbc_54b11746","updated":"2016-10-08 09:56:31.000000000","message":"clearing db_store is to make the df controller think it is a new resource, or else, df controller might not download the flows.\n\nWhen openflow connection loses, the db store will still be updated to the latest data. So, when the openflow reconnects, even if we trigger the sync action to db, df controller will still think it is update to date, and nothing need to do. If we want to reuse the existing logic, the db_store has to be cleared to make the df think it needs to apply data in nb db to local.\n\nFor the stale flows, as @WangJian mentioned, it is not easy. Because we don\u0027t have mechanism to read flows in ovs, we don\u0027t know which ones are stale, which are not.\n\n\nMaybe using aging app can resolve the problem in another approach. I need more think about it.","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"994f84d835a0132fe411b95a29c46c111f5652ca","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                self.nb_api.register_notification_callback(self)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def run_sync(self, mode\u003dNone):"},{"line_number":130,"context_line":"        if mode \u003d\u003d \u0027full_sync\u0027:"},{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_a730d3e9","line":134,"range":{"start_line":130,"start_character":0,"end_line":134,"end_character":33},"in_reply_to":"1a95cdbc_b91c8fc2","updated":"2016-10-06 07:43:03.000000000","message":"I think the Aging class is the mechanism for that. So yes, old flows will need to be removed.","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"a81aabae33eca325f2b47769ac289ca1e6ba5639","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                self.nb_api.register_notification_callback(self)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def run_sync(self, mode\u003dNone):"},{"line_number":130,"context_line":"        if mode \u003d\u003d \u0027full_sync\u0027:"},{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da4df55a_6ce27205","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":33},"updated":"2016-12-22 15:05:38.000000000","message":"what about do a copy of the db_store and then clear the db_store, and re-download the openflow flows by the copied data, so that we can avoid to pull data from remote df db.","commit_id":"274a3d94560ddb94fedeee3f6991713d666ed91c"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d5aa6f624b77eb6ba10719e6c502f522c2907961","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                self.nb_api.register_notification_callback(self)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def run_sync(self, mode\u003dNone):"},{"line_number":130,"context_line":"        if mode \u003d\u003d \u0027full_sync\u0027:"},{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da4df55a_efa47dba","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":33},"in_reply_to":"da4df55a_697ecee5","updated":"2016-12-23 02:52:15.000000000","message":"ok","commit_id":"274a3d94560ddb94fedeee3f6991713d666ed91c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e55d8bb6c9fe7f80e9d05affb351917e301abf0a","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                self.nb_api.register_notification_callback(self)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def run_sync(self, mode\u003dNone):"},{"line_number":130,"context_line":"        if mode \u003d\u003d \u0027full_sync\u0027:"},{"line_number":131,"context_line":"            # For a full sync, df needs to clean the local cache, so that"},{"line_number":132,"context_line":"            # all resources will be treated as new resource, and thus be"},{"line_number":133,"context_line":"            # applied to local."},{"line_number":134,"context_line":"            self.db_store.clear()"},{"line_number":135,"context_line":"        while True:"},{"line_number":136,"context_line":"            time.sleep(1)"},{"line_number":137,"context_line":"            self.run_db_poll()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da4df55a_697ecee5","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":33},"in_reply_to":"da4df55a_6ce27205","updated":"2016-12-23 01:09:15.000000000","message":"That is feasible, but I would not do that for now.\n\nWe won\u0027t expect this scenario to be frequent, so I think its performance is not that important. Beside, that way will not be able to re-use existing logic and  build another mechanism to sync data. It increases the complexity and I think it is not necessary. Maybe we can do that in future if we found there is pain here.","commit_id":"274a3d94560ddb94fedeee3f6991713d666ed91c"}],"dragonflow/controller/dnat_app.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"994f84d835a0132fe411b95a29c46c111f5652ca","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self._init_external_bridge()"},{"line_number":61,"context_line":"        self._install_output_to_physical_patch(self.external_ofport)"},{"line_number":62,"context_line":"        self.external_networks.clear()"},{"line_number":63,"context_line":"        self.local_floatingips.clear()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def ovs_port_updated(self, ovs_port):"},{"line_number":66,"context_line":"        if ovs_port.get_name() !\u003d self.external_network_bridge:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_077d076e","line":63,"updated":"2016-10-06 07:43:03.000000000","message":"external_bridge_mac should also be updated (either set to \"\" and re-read when ovs_port_updated is called, or to get the port directly from OVS if ovs_port_updated won\u0027t be called for the external network bridge).","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a57a947ce4b842f47287ce583c782adbe9269c8a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self._init_external_bridge()"},{"line_number":61,"context_line":"        self._install_output_to_physical_patch(self.external_ofport)"},{"line_number":62,"context_line":"        self.external_networks.clear()"},{"line_number":63,"context_line":"        self.local_floatingips.clear()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def ovs_port_updated(self, ovs_port):"},{"line_number":66,"context_line":"        if ovs_port.get_name() !\u003d self.external_network_bridge:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_ecdb377a","line":63,"in_reply_to":"1a95cdbc_077d076e","updated":"2016-10-08 09:56:31.000000000","message":"Here we assume that the ovsdb is still connected with dragonflow, so the mac should be updated to the dnat_app.","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"}],"dragonflow/db/db_store.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"41fd59f306d4c30eff177dd8275cb37efb3db586","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def clear(self):"},{"line_number":286,"context_line":"        for topic in self.tenant_dbs:"},{"line_number":287,"context_line":"            new_tenant_db \u003d TenantDbStore()"},{"line_number":288,"context_line":"            new_tenant_db.publishers \u003d self.tenant_dbs[topic].publishers"},{"line_number":289,"context_line":"            self.tenant_dbs[topic] \u003d new_tenant_db"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_9907d31b","line":289,"range":{"start_line":287,"start_character":12,"end_line":289,"end_character":50},"updated":"2016-10-05 16:26:46.000000000","message":"why not move these to TenantDbStore? TenantDbStore supplies methods, like set, get, key, value, and it should support clear","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"994f84d835a0132fe411b95a29c46c111f5652ca","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def clear(self):"},{"line_number":286,"context_line":"        for topic in self.tenant_dbs:"},{"line_number":287,"context_line":"            new_tenant_db \u003d TenantDbStore()"},{"line_number":288,"context_line":"            new_tenant_db.publishers \u003d self.tenant_dbs[topic].publishers"},{"line_number":289,"context_line":"            self.tenant_dbs[topic] \u003d new_tenant_db"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_c7d31f37","line":289,"range":{"start_line":287,"start_character":12,"end_line":289,"end_character":50},"in_reply_to":"1a95cdbc_9907d31b","updated":"2016-10-06 07:43:03.000000000","message":"+1","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a57a947ce4b842f47287ce583c782adbe9269c8a","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def clear(self):"},{"line_number":286,"context_line":"        for topic in self.tenant_dbs:"},{"line_number":287,"context_line":"            new_tenant_db \u003d TenantDbStore()"},{"line_number":288,"context_line":"            new_tenant_db.publishers \u003d self.tenant_dbs[topic].publishers"},{"line_number":289,"context_line":"            self.tenant_dbs[topic] \u003d new_tenant_db"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_ac7e8f67","line":289,"range":{"start_line":287,"start_character":12,"end_line":289,"end_character":50},"in_reply_to":"1a95cdbc_9907d31b","updated":"2016-10-08 09:56:31.000000000","message":"good point","commit_id":"ca7c9e55b9f6bb1179cfcf6651298af771ee963c"}],"dragonflow/tests/fullstack/test_apps.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a94ba07a64d88ed3bf23406c30e2fd4ecb586303","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        )"},{"line_number":723,"context_line":"        policy.start(self.topology)"},{"line_number":724,"context_line":"        try:"},{"line_number":725,"context_line":"            policy.wait(const.DEFAULT_RESOURCE_READY_TIMEOUT)"},{"line_number":726,"context_line":"        except Exception:"},{"line_number":727,"context_line":"            # Since there is no OpenFlow in vswitch, we are expecting timeout"},{"line_number":728,"context_line":"            # exception here."}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_061e2a63","line":725,"updated":"2017-01-01 08:23:54.000000000","message":"Wouldn\u0027t this be done better with testtools.expectedexception ?","commit_id":"274a3d94560ddb94fedeee3f6991713d666ed91c"}]}
