)]}'
{"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                )"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"                if self.enable_db_consistency:"},{"line_number":252,"context_line":"                    # FIXME (dimak) move into factory function"},{"line_number":253,"context_line":"                    if issubclass(model, mixins.Version):"},{"line_number":254,"context_line":"                        handler_class \u003d db_consistent.VersionedModelHandler"},{"line_number":255,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_25285fe0","line":252,"range":{"start_line":252,"start_character":0,"end_line":252,"end_character":62},"updated":"2017-03-27 08:35:16.000000000","message":"Why not do this as part of this refactor?","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"}],"dragonflow/db/db_consistent.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"b515af849e9b2f2a5fa2d3a256fdd470c14390a2","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        for local_obj, nb_obj in ("},{"line_number":241,"context_line":"            (local_objects[id], nb_objects[id]) for id in common_ids"},{"line_number":242,"context_line":"        ):"},{"line_number":243,"context_line":"            LOG.debug("},{"line_number":244,"context_line":"                \"Found a newer version df object: %r \u003d\u003e %r\","},{"line_number":245,"context_line":"                local_obj, nb_obj,"},{"line_number":246,"context_line":"            )"},{"line_number":247,"context_line":"            if _is_newer(_get_version(nb_obj), _get_version(local_obj)):"},{"line_number":248,"context_line":"                handler.handle_update(direct, nb_obj, local_obj)"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_a8e9feb8","line":246,"range":{"start_line":243,"start_character":6,"end_line":246,"end_character":13},"updated":"2017-03-05 15:29:27.000000000","message":"Oops this should go into the if statement below","commit_id":"6d59824f7bdd1e9d2bcd79f820c0feae90a20fba"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"2da374789e08230b32210d82943d17d73e9e6027","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                \"Found a newer version df object: %r \u003d\u003e %r\","},{"line_number":245,"context_line":"                local_obj, nb_obj,"},{"line_number":246,"context_line":"            )"},{"line_number":247,"context_line":"            if _is_newer(_get_version(nb_obj), _get_version(local_obj)):"},{"line_number":248,"context_line":"                handler.handle_update(direct, nb_obj, local_obj)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        for obj in (nb_objects[id] for id in added_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_9044584a","line":247,"range":{"start_line":247,"start_character":0,"end_line":247,"end_character":72},"updated":"2017-03-06 02:24:41.000000000","message":"Maybe move this check to handler? So that ModelHandler can always update data, and VersionedModelHandler needs to do a version check before updating data.","commit_id":"6d59824f7bdd1e9d2bcd79f820c0feae90a20fba"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"bc3484d8bce75fc00e6210f0b5ed8836dd713488","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                \"Found a newer version df object: %r \u003d\u003e %r\","},{"line_number":245,"context_line":"                local_obj, nb_obj,"},{"line_number":246,"context_line":"            )"},{"line_number":247,"context_line":"            if _is_newer(_get_version(nb_obj), _get_version(local_obj)):"},{"line_number":248,"context_line":"                handler.handle_update(direct, nb_obj, local_obj)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        for obj in (nb_objects[id] for id in added_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_5350350b","line":247,"range":{"start_line":247,"start_character":0,"end_line":247,"end_character":72},"in_reply_to":"ba2be162_9044584a","updated":"2017-03-12 08:30:47.000000000","message":"I agree, I also added __eq__ check for old vs. new to avoid updating when we have exactly the same object.","commit_id":"6d59824f7bdd1e9d2bcd79f820c0feae90a20fba"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_DELETE \u003d \u0027delete\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class _CacheObject(object):"},{"line_number":39,"context_line":"    def __init__(self, action, nb_version, local_version):"},{"line_number":40,"context_line":"        self.action \u003d action"},{"line_number":41,"context_line":"        self.nb_version \u003d nb_version"},{"line_number":42,"context_line":"        self.local_version \u003d local_version"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class ModelHandler(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_e59277f6","line":42,"range":{"start_line":38,"start_character":0,"end_line":42,"end_character":42},"updated":"2017-03-27 08:35:16.000000000","message":"Isn\u0027t this a named tuple?","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.local_version \u003d local_version"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class ModelHandler(object):"},{"line_number":46,"context_line":"    \u0027\u0027\u0027This class encapsulates all the actions that db consistency model will"},{"line_number":47,"context_line":"    perform on a specific model."},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_485ffa71","line":45,"updated":"2017-03-27 08:35:16.000000000","message":"The logic in the methods in this class is not clear. I think an explanation is needed.","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return cache_obj"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _add_to_cache(self, action, nb_obj\u003dNone, local_obj\u003dNone):"},{"line_number":91,"context_line":"        obj_id \u003d (nb_obj or local_obj).id"},{"line_number":92,"context_line":"        self.cache[obj_id] \u003d _CacheObject("},{"line_number":93,"context_line":"            action,"},{"line_number":94,"context_line":"            _get_version(nb_obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_a88a0618","line":91,"range":{"start_line":91,"start_character":0,"end_line":91,"end_character":41},"updated":"2017-03-27 08:35:16.000000000","message":"nit: Maybe add id as a paramter, so this magic won\u0027t be necessary?","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        if obj \u003d\u003d local_obj:"},{"line_number":114,"context_line":"            return"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        if direct:"},{"line_number":117,"context_line":"            self._update_handler(obj)"},{"line_number":118,"context_line":"        else:"},{"line_number":119,"context_line":"            cache_obj \u003d self._get_cache_obj(_UPDATE, obj.id)"},{"line_number":120,"context_line":"            if cache_obj is None:"},{"line_number":121,"context_line":"                self._add_to_cache(_UPDATE, nb_obj\u003dobj, local_obj\u003dlocal_obj)"},{"line_number":122,"context_line":"            else:"},{"line_number":123,"context_line":"                self._handle_indirect_update(cache_obj, obj, local_obj)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _handle_indirect_update(self, cache_obj, obj, local_obj):"},{"line_number":126,"context_line":"        self._update_handler(obj)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_e8480ecd","line":123,"range":{"start_line":116,"start_character":0,"end_line":123,"end_character":71},"updated":"2017-03-27 08:35:16.000000000","message":"This is very similar to handle_create.","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            else:"},{"line_number":123,"context_line":"                self._handle_indirect_update(cache_obj, obj, local_obj)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _handle_indirect_update(self, cache_obj, obj, local_obj):"},{"line_number":126,"context_line":"        self._update_handler(obj)"},{"line_number":127,"context_line":"        del self.cache[obj.id]"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_48ea5aac","line":125,"range":{"start_line":125,"start_character":0,"end_line":125,"end_character":65},"updated":"2017-03-27 08:35:16.000000000","message":"Isn\u0027t this the same as _handle_indirect_create?","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            handler.handle_delete(direct, obj)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        for local_obj, nb_obj in ("},{"line_number":243,"context_line":"            (local_objects[id], nb_objects[id]) for id in common_ids"},{"line_number":244,"context_line":"        ):"},{"line_number":245,"context_line":"            handler.handle_update(direct, nb_obj, local_obj)"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_a5f0ef68","line":243,"range":{"start_line":243,"start_character":12,"end_line":243,"end_character":68},"updated":"2017-03-27 08:35:16.000000000","message":"Maybe put in a variable?","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a518b9c2555e97ee7c733980f5f4a864a8e3f47","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        ):"},{"line_number":245,"context_line":"            handler.handle_update(direct, nb_obj, local_obj)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        for obj in (nb_objects[id] for id in added_ids):"},{"line_number":248,"context_line":"            LOG.debug(\"Found a new df object: %r\", obj)"},{"line_number":249,"context_line":"            handler.handle_create(direct, obj)"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_2504df49","line":247,"range":{"start_line":247,"start_character":19,"end_line":247,"end_character":55},"updated":"2017-03-27 08:35:16.000000000","message":"Same here re: variable?","commit_id":"aeb4d08e1e86932b5481d0231fe22868e91631ad"}]}
