)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b13ee259b2d64d685f48d0a8dd8124f8251b483e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Full sync to ODL server when we detect an ODL cold reboot"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I193db82ca03290707a3eb1f7fa914a02ee1a84de"},{"line_number":12,"context_line":"Signed-off-by: Mike Kolesnik \u003cmkolesni@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_f8b804ca","line":12,"updated":"2016-04-21 01:09:16.000000000","message":"openstack doesn\u0027t adopt s-o-b.","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2b5a72178d42078e1e15541906378a5413877044","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Full sync to ODL server when we detect an ODL cold reboot"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I193db82ca03290707a3eb1f7fa914a02ee1a84de"},{"line_number":12,"context_line":"Signed-off-by: Mike Kolesnik \u003cmkolesni@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_023d18bb","line":12,"in_reply_to":"1a122d0e_f8b804ca","updated":"2016-05-01 06:43:44.000000000","message":"I don\u0027t see a policy prohibiting it.\n\nIf it\u0027s interfering I\u0027ll remove it but I see in the project git log that it\u0027s sometimes used by people (including yourself).","commit_id":"fa830a6455b883531932fff29524343efe9d95da"}],"networking_odl/db/db.py":[{"author":{"_account_id":19348,"name":"Oded Shvartz","email":"oshvartz@redhat.com","username":"oshvartz"},"change_message_id":"a5851f44a445772a37f3ffa3a2a43fe986a0cb52","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            models.OpendaylightJournal.operation.in_(operations_to_delete),"},{"line_number":171,"context_line":"            models.OpendaylightJournal.state \u003d\u003d odl_const.PENDING).delete("},{"line_number":172,"context_line":"            synchronize_session\u003dFalse)"},{"line_number":173,"context_line":"        session.expire_all()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"@db_api.retry_db_errors"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_3ae90ce7","line":173,"updated":"2016-04-20 06:05:50.000000000","message":"Can you explain why we need to clean the cache (I guess that this is what the \"session.expire_all()\" do )?","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e67479218c22c90a1322190b0355226e91bc927d","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            models.OpendaylightJournal.operation.in_(operations_to_delete),"},{"line_number":171,"context_line":"            models.OpendaylightJournal.state \u003d\u003d odl_const.PENDING).delete("},{"line_number":172,"context_line":"            synchronize_session\u003dFalse)"},{"line_number":173,"context_line":"        session.expire_all()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"@db_api.retry_db_errors"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5755a7c3","line":173,"in_reply_to":"1a122d0e_3ae90ce7","updated":"2016-04-20 13:57:08.000000000","message":"This is because the delete is running in batch mode, so the session can have stale data after the delete..\n\nIt\u0027s standard SQLAlchemy behavior from their docs.","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"}],"networking_odl/journal/full_sync.py":[{"author":{"_account_id":19348,"name":"Oded Shvartz","email":"oshvartz@redhat.com","username":"oshvartz"},"change_message_id":"a5851f44a445772a37f3ffa3a2a43fe986a0cb52","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron import manager"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Define which pending operation types should be deleted"},{"line_number":23,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":24,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":25,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":26,"context_line":"                        \u0027admin_state_up\u0027: False}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_9ac02052","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":59},"updated":"2016-04-20 06:05:50.000000000","message":"If now the canary network id is in the full_sync class do we still need it on the model ?","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e67479218c22c90a1322190b0355226e91bc927d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron import manager"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Define which pending operation types should be deleted"},{"line_number":23,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":24,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":25,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":26,"context_line":"                        \u0027admin_state_up\u0027: False}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_f71e730a","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":59},"in_reply_to":"1a122d0e_9ac02052","updated":"2016-04-20 13:57:08.000000000","message":"I already removed it from the maintenance thread patch","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":19348,"name":"Oded Shvartz","email":"oshvartz@redhat.com","username":"oshvartz"},"change_message_id":"a5851f44a445772a37f3ffa3a2a43fe986a0cb52","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":26,"context_line":"                        \u0027admin_state_up\u0027: False}"},{"line_number":27,"context_line":"_OPS_TO_DELETE_ON_SYNC \u003d (odl_const.ODL_CREATE, odl_const.ODL_UPDATE)"},{"line_number":28,"context_line":"_RESOURCES_TO_SYNC \u003d [(odl_const.ODL_NETWORK, odl_const.ODL_NETWORKS),"},{"line_number":29,"context_line":"                      (odl_const.ODL_SUBNET, odl_const.ODL_SUBNETS),"},{"line_number":30,"context_line":"                      (odl_const.ODL_PORT, odl_const.ODL_PORTS)]"},{"line_number":31,"context_line":"_DELETE_ME_FULL_SYNC_NEEDED \u003d False"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_1acd3085","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":64},"updated":"2016-04-20 06:05:50.000000000","message":"What about SG ?","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e67479218c22c90a1322190b0355226e91bc927d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":26,"context_line":"                        \u0027admin_state_up\u0027: False}"},{"line_number":27,"context_line":"_OPS_TO_DELETE_ON_SYNC \u003d (odl_const.ODL_CREATE, odl_const.ODL_UPDATE)"},{"line_number":28,"context_line":"_RESOURCES_TO_SYNC \u003d [(odl_const.ODL_NETWORK, odl_const.ODL_NETWORKS),"},{"line_number":29,"context_line":"                      (odl_const.ODL_SUBNET, odl_const.ODL_SUBNETS),"},{"line_number":30,"context_line":"                      (odl_const.ODL_PORT, odl_const.ODL_PORTS)]"},{"line_number":31,"context_line":"_DELETE_ME_FULL_SYNC_NEEDED \u003d False"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_97bd7fda","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":64},"in_reply_to":"1a122d0e_1acd3085","updated":"2016-04-20 13:57:08.000000000","message":"This is just a skeleton for the beginning, SG and L3 will be added later once we have the basic process done.","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":19348,"name":"Oded Shvartz","email":"oshvartz@redhat.com","username":"oshvartz"},"change_message_id":"a5851f44a445772a37f3ffa3a2a43fe986a0cb52","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                          odl_const.ODL_CREATE, _CANARY_NETWORK_DATA)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _full_sync_needed(session):"},{"line_number":50,"context_line":"    return _DELETE_ME_FULL_SYNC_NEEDED"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def _sync_resources(session, plugin, dbcontext, object_type, collection_name):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_1ad090f5","line":50,"range":{"start_line":49,"start_character":0,"end_line":50,"end_character":38},"updated":"2016-04-20 06:05:50.000000000","message":"I guess that because this patch is still \"WIP\" the logic for checking if full sync is needed is missing.","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e67479218c22c90a1322190b0355226e91bc927d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                          odl_const.ODL_CREATE, _CANARY_NETWORK_DATA)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _full_sync_needed(session):"},{"line_number":50,"context_line":"    return _DELETE_ME_FULL_SYNC_NEEDED"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def _sync_resources(session, plugin, dbcontext, object_type, collection_name):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_d7b37708","line":50,"range":{"start_line":49,"start_character":0,"end_line":50,"end_character":38},"in_reply_to":"1a122d0e_1ad090f5","updated":"2016-04-20 13:57:08.000000000","message":"Done","commit_id":"6652590f12d2b14567313bc071d58cfaee8f746d"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b13ee259b2d64d685f48d0a8dd8124f8251b483e","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# Define which pending operation types should be deleted"},{"line_number":25,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":26,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":27,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":28,"context_line":"                        \u0027admin_state_up\u0027: False}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_f8f00469","line":25,"updated":"2016-04-21 01:09:16.000000000","message":"In order to avoid uuid conflict, we need to insert row into network table.","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2b5a72178d42078e1e15541906378a5413877044","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# Define which pending operation types should be deleted"},{"line_number":25,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":26,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":27,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":28,"context_line":"                        \u0027admin_state_up\u0027: False}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_c27160aa","line":25,"in_reply_to":"1a122d0e_f8f00469","updated":"2016-05-01 06:43:44.000000000","message":"The changes of UUID conflict are statistically improbable.\n\nBut if it\u0027s such a concern then we can perhaps fail a network create if it has the same UUID as the canary network.\n\nIMHO we shouldn\u0027t bother and let math do it\u0027s job..","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b13ee259b2d64d685f48d0a8dd8124f8251b483e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_RESOURCES_TO_SYNC \u003d [(odl_const.ODL_NETWORK, odl_const.ODL_NETWORKS),"},{"line_number":31,"context_line":"                      (odl_const.ODL_SUBNET, odl_const.ODL_SUBNETS),"},{"line_number":32,"context_line":"                      (odl_const.ODL_PORT, odl_const.ODL_PORTS)]"},{"line_number":33,"context_line":"_DELETE_ME_FULL_SYNC_NEEDED \u003d False"},{"line_number":34,"context_line":"_CLIENT \u003d client.OpenDaylightRestClient.create_client()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_9843d0ae","line":33,"updated":"2016-04-21 01:09:16.000000000","message":"unused variable.","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2b5a72178d42078e1e15541906378a5413877044","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_RESOURCES_TO_SYNC \u003d [(odl_const.ODL_NETWORK, odl_const.ODL_NETWORKS),"},{"line_number":31,"context_line":"                      (odl_const.ODL_SUBNET, odl_const.ODL_SUBNETS),"},{"line_number":32,"context_line":"                      (odl_const.ODL_PORT, odl_const.ODL_PORTS)]"},{"line_number":33,"context_line":"_DELETE_ME_FULL_SYNC_NEEDED \u003d False"},{"line_number":34,"context_line":"_CLIENT \u003d client.OpenDaylightRestClient.create_client()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_62632cdd","line":33,"in_reply_to":"1a122d0e_9843d0ae","updated":"2016-05-01 06:43:44.000000000","message":"Done","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b13ee259b2d64d685f48d0a8dd8124f8251b483e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"_CLIENT \u003d client.OpenDaylightRestClient.create_client()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def full_sync(session, journal):"},{"line_number":38,"context_line":"    if not _full_sync_needed(session):"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_98be30ac","line":37,"updated":"2016-04-21 01:09:16.000000000","message":"Can we make those into a class?","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2b5a72178d42078e1e15541906378a5413877044","unresolved":false,"context_lines":[{"line_number":34,"context_line":"_CLIENT \u003d client.OpenDaylightRestClient.create_client()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def full_sync(session, journal):"},{"line_number":38,"context_line":"    if not _full_sync_needed(session):"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_a29b84c8","line":37,"in_reply_to":"1a122d0e_98be30ac","updated":"2016-05-01 06:43:44.000000000","message":"What would be the benefit of that?","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"e82b75e0b69c242058242a30774d829de28bce6b","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    resources \u003d obj_getter(dbcontext)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    for resource in resources:"},{"line_number":79,"context_line":"        db.create_pending_row(session, object_type, resource[\u0027id\u0027],"},{"line_number":80,"context_line":"                              odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_0b2aa3e7","line":79,"updated":"2016-04-21 16:45:24.000000000","message":"The event handlers (today, create/update port) add additional information to be saved in journal\u0027s db.data. If this design stays then we can call the precommit handlers here instead.","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2b5a72178d42078e1e15541906378a5413877044","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    resources \u003d obj_getter(dbcontext)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    for resource in resources:"},{"line_number":79,"context_line":"        db.create_pending_row(session, object_type, resource[\u0027id\u0027],"},{"line_number":80,"context_line":"                              odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_26819bc4","line":79,"in_reply_to":"1a122d0e_0b2aa3e7","updated":"2016-05-01 06:43:44.000000000","message":"I see, but it is quite problematic to call those methods from here..\n\nI will push a refactor patch that moves that logic away from there so that both the callbacks and this code will work correctly..","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"9c3af1fcac69a7f33fb20778ab8455cec7d7a45e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    resources \u003d obj_getter(dbcontext)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    for resource in resources:"},{"line_number":79,"context_line":"        db.create_pending_row(session, object_type, resource[\u0027id\u0027],"},{"line_number":80,"context_line":"                              odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_1078daf7","line":79,"in_reply_to":"1a122d0e_26819bc4","updated":"2016-05-03 17:28:00.000000000","message":"Rich, please take a look at https://review.openstack.org/#/c/312033\n\nThat patch should solve this problem, and if it looks good I\u0027ll rebase this one on top of the other one","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"88a57c48286ecfdd5d75f62a4731459f1c1d3e41","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# Define which pending operation types should be deleted"},{"line_number":25,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":26,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":27,"context_line":"                        \u0027tenant_id\u0027: _CANARY_NETWORK_ID,"},{"line_number":28,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":29,"context_line":"                        \u0027admin_state_up\u0027: False}"},{"line_number":30,"context_line":"_OPS_TO_DELETE_ON_SYNC \u003d (odl_const.ODL_CREATE, odl_const.ODL_UPDATE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_97514465","line":27,"updated":"2016-05-04 21:10:19.000000000","message":"It\u0027s fine to use same uuid for tenant id.\nBut please introduce _CANARY_NETWORK_TENANT_ID or something to make it clear.\nOr we can use \u0027\u0027(empty string) for tenant id.","commit_id":"2487dd2a90248d04f961abde3b24d8c2cc254afa"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2ba59ce5737ffdcec2c70331e8b43895c6eb9154","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# Define which pending operation types should be deleted"},{"line_number":25,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":26,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":27,"context_line":"                        \u0027tenant_id\u0027: _CANARY_NETWORK_ID,"},{"line_number":28,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":29,"context_line":"                        \u0027admin_state_up\u0027: False}"},{"line_number":30,"context_line":"_OPS_TO_DELETE_ON_SYNC \u003d (odl_const.ODL_CREATE, odl_const.ODL_UPDATE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_b547434a","line":27,"in_reply_to":"1a122d0e_97514465","updated":"2016-05-08 13:09:39.000000000","message":"Done, added a different const for it\n\nWe can\u0027t use empty UUID unfortunately since it breaks ODL (in our manual tests), but fake UUID works just as well..","commit_id":"2487dd2a90248d04f961abde3b24d8c2cc254afa"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"17d901aacfe9a6f928df9c2eed0b97ac1bcddd11","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    if not _full_sync_needed(session):"},{"line_number":42,"context_line":"        return"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    db.delete_pending_rows(session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    dbcontext \u003d neutron_context.get_admin_context()"},{"line_number":47,"context_line":"    plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_7683ef04","line":44,"updated":"2016-05-19 20:56:35.000000000","message":"I hesitate to delete those rows for debuggability.\nProbably we\u0027d like to introduce new state.","commit_id":"e27682843651816d17a34a925186a2eb3f05d4a3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"4a030749f8fbd672e01d561eb8035347fa353d72","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    if not _full_sync_needed(session):"},{"line_number":42,"context_line":"        return"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    db.delete_pending_rows(session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    dbcontext \u003d neutron_context.get_admin_context()"},{"line_number":47,"context_line":"    plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_e2a4ef08","line":44,"in_reply_to":"bab6814e_7683ef04","updated":"2016-05-22 09:07:50.000000000","message":"I understand but I\u0027m not sure what a new state will solve.\n\nIt doesn\u0027t make sense to attempt those operations since:\nIf it\u0027s a CREATE then it\u0027ll be handled by full sync anyway.\nIf it\u0027s an UPDATE then the resource won\u0027t exist anyway until the full sync handles it, and after it\u0027s created it will already be up to date making this operation redundant.\n\nIf you prefer that we don\u0027t delete them we can move them to completed instead.","commit_id":"e27682843651816d17a34a925186a2eb3f05d4a3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d6b162129f7acca5a208831ccca7af87385f53d7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    if not _full_sync_needed(session):"},{"line_number":42,"context_line":"        return"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    db.delete_pending_rows(session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    dbcontext \u003d neutron_context.get_admin_context()"},{"line_number":47,"context_line":"    plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_cff196cf","line":44,"in_reply_to":"bab6814e_e2a4ef08","updated":"2016-05-25 00:09:13.000000000","message":"With the changeset of fbff52b652d5ec2b7d41106f667ae8d52fd97554, we introduced a option to keep complete entry for later use.\nFor consistency and later use, probably we\u0027d like to keep those entries instead of unconditionally deleting entries.\nI don\u0027t have clear idea to re-use those entries,though.\n\nPersonally I\u0027m fine with those logic.\nI\u0027d like to have others to review this patch.","commit_id":"e27682843651816d17a34a925186a2eb3f05d4a3"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"ef737fc4417264020bba3a76ebc495adea8fb067","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# Define which pending operation types should be deleted"},{"line_number":25,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":26,"context_line":"_CANARY_TENANT_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":27,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":28,"context_line":"                        \u0027tenant_id\u0027: _CANARY_TENANT_ID,"},{"line_number":29,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_fe9e3b61","line":26,"updated":"2016-06-01 14:53:34.000000000","message":"Is there a reason why you\u0027re using the same UUID for network and tenant?","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"6a8b2eba509503af36c401a11961e09cf617d8d2","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# Define which pending operation types should be deleted"},{"line_number":25,"context_line":"_CANARY_NETWORK_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":26,"context_line":"_CANARY_TENANT_ID \u003d \"bd8db3a8-2b30-4083-a8b3-b3fd46401142\""},{"line_number":27,"context_line":"_CANARY_NETWORK_DATA \u003d {\u0027id\u0027: _CANARY_NETWORK_ID,"},{"line_number":28,"context_line":"                        \u0027tenant_id\u0027: _CANARY_TENANT_ID,"},{"line_number":29,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_cb5c564d","line":26,"in_reply_to":"9abb7d3a_fe9e3b61","updated":"2016-06-01 16:01:18.000000000","message":"No particular one but they\u0027re as good as any other constant UUIDs.\nIf you have another suggestion I don\u0027t mind changing these values.","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"ef737fc4417264020bba3a76ebc495adea8fb067","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":30,"context_line":"                        \u0027admin_state_up\u0027: False}"},{"line_number":31,"context_line":"_OPS_TO_DELETE_ON_SYNC \u003d (odl_const.ODL_CREATE, odl_const.ODL_UPDATE)"},{"line_number":32,"context_line":"_RESOURCES_TO_SYNC \u003d [(odl_const.ODL_SG, odl_const.ODL_SGS),"},{"line_number":33,"context_line":"                      (odl_const.ODL_SG_RULE, odl_const.ODL_SG_RULES),"},{"line_number":34,"context_line":"                      (odl_const.ODL_NETWORK, odl_const.ODL_NETWORKS),"},{"line_number":35,"context_line":"                      (odl_const.ODL_SUBNET, odl_const.ODL_SUBNETS),"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_e34fc831","line":32,"updated":"2016-06-01 14:53:34.000000000","message":"i take it that L3 will be phased in at a later time?","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"6a8b2eba509503af36c401a11961e09cf617d8d2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                        \u0027name\u0027: \u0027Sync Canary Network\u0027,"},{"line_number":30,"context_line":"                        \u0027admin_state_up\u0027: False}"},{"line_number":31,"context_line":"_OPS_TO_DELETE_ON_SYNC \u003d (odl_const.ODL_CREATE, odl_const.ODL_UPDATE)"},{"line_number":32,"context_line":"_RESOURCES_TO_SYNC \u003d [(odl_const.ODL_SG, odl_const.ODL_SGS),"},{"line_number":33,"context_line":"                      (odl_const.ODL_SG_RULE, odl_const.ODL_SG_RULES),"},{"line_number":34,"context_line":"                      (odl_const.ODL_NETWORK, odl_const.ODL_NETWORKS),"},{"line_number":35,"context_line":"                      (odl_const.ODL_SUBNET, odl_const.ODL_SUBNETS),"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_ab347249","line":32,"in_reply_to":"9abb7d3a_e34fc831","updated":"2016-06-01 16:01:18.000000000","message":"Yes I didn\u0027t get to it yet but thats my next goal.","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"ef737fc4417264020bba3a76ebc495adea8fb067","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    resources \u003d obj_getter(dbcontext)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    for resource in resources:"},{"line_number":87,"context_line":"        db.create_pending_row(session, object_type, resource[\u0027id\u0027],"},{"line_number":88,"context_line":"                              odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_3ed3a361","line":87,"updated":"2016-06-01 14:53:34.000000000","message":"Note that creating the objects in this tight loop will be exercising the dependency/validation logic. There\u0027s a good chance that different object (and possible dependent) types will be created inside of one second. _get_oldest_pending will return objects out of order. We know this and coded for these cases (and have seen it happen in the event handlers).\nBut for a large deployment it will be interesting what results we find when this full sync occurs. If it ends up taking a long time to resync then perhaps adding a sleep(1) in this loop would help. Saving the created_at, last_retried columns in millisecond range would also help but didn\u0027t find many examples on where other openstack projects saved db columns using anything other than seconds.","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"6a8b2eba509503af36c401a11961e09cf617d8d2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    resources \u003d obj_getter(dbcontext)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    for resource in resources:"},{"line_number":87,"context_line":"        db.create_pending_row(session, object_type, resource[\u0027id\u0027],"},{"line_number":88,"context_line":"                              odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_abfd926f","line":87,"in_reply_to":"9abb7d3a_3ed3a361","updated":"2016-06-01 16:01:18.000000000","message":"You are correct, however you should notice that the loop iterates essentially over the resource types in order so SG \u0026 rules are first, then Nets, then Subnets and last are Ports so the dependency logic should act as a safety net here.\n\nIndeed we should have some more testing for this, I will try to think up on some test for this that we can do in unit test as a follow up patch.\n\nA sleep of 1s could be problematic in this loop in a high load, perhaps in the context of the outer loop it can make a bit more sense but I think the best way to go about it is to add it if we see a concrete issue.","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"3367a0b89eceaa2f9b684f55f6428c14dba26635","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    resources \u003d obj_getter(dbcontext)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    for resource in resources:"},{"line_number":87,"context_line":"        db.create_pending_row(session, object_type, resource[\u0027id\u0027],"},{"line_number":88,"context_line":"                              odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_c600cd36","line":87,"in_reply_to":"9abb7d3a_abfd926f","updated":"2016-06-01 16:12:35.000000000","message":"Yeah I noticed that we will process networks, subnets, ports in order (which will help) but I\u0027ll bet a dollar that we\u0027ll see some network, subnet, port rows with the same timestamp.\nNothing that the dep. logic shouldn\u0027t handle. Again, just wondering what\u0027s going to happen under large loads.\n\nRegarding the sleep(1) comment, yes, I meant to comment that as being outside the for loop (or somewhere else in this logic path). Just something to change a network timestamp from subnet, etc.\nAnd I agree that this doesn\u0027t need to be added today. Just something to keep in mind.","commit_id":"b1821fbdd777d8a43bbcc914e783b8285e85660b"}],"networking_odl/tests/unit/journal/test_full_sync.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b13ee259b2d64d685f48d0a8dd8124f8251b483e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":21,"context_line":"from networking_odl.db import db"},{"line_number":22,"context_line":"from networking_odl.db import models"},{"line_number":23,"context_line":"from networking_odl.journal import full_sync"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from neutron.db import api as neutron_db_api"},{"line_number":26,"context_line":"from neutron import manager"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_3859dc8e","line":23,"updated":"2016-04-21 01:09:16.000000000","message":"import order.","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2b5a72178d42078e1e15541906378a5413877044","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":21,"context_line":"from networking_odl.db import db"},{"line_number":22,"context_line":"from networking_odl.db import models"},{"line_number":23,"context_line":"from networking_odl.journal import full_sync"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from neutron.db import api as neutron_db_api"},{"line_number":26,"context_line":"from neutron import manager"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_62ba0c25","line":23,"in_reply_to":"1a122d0e_3859dc8e","updated":"2016-05-01 06:43:44.000000000","message":"Done","commit_id":"fa830a6455b883531932fff29524343efe9d95da"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"17d901aacfe9a6f928df9c2eed0b97ac1bcddd11","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from networking_odl.journal import full_sync"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class FullSyncTestCase(SqlTestCaseLight, TestCase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(FullSyncTestCase, self).setUp()"},{"line_number":34,"context_line":"        self.db_session \u003d neutron_db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_d64a9bab","line":31,"updated":"2016-05-19 20:56:35.000000000","message":"We don\u0027t need TestCase because SqlTestCase inherits unittest2.case.TestCase.","commit_id":"e27682843651816d17a34a925186a2eb3f05d4a3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"4a030749f8fbd672e01d561eb8035347fa353d72","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from networking_odl.journal import full_sync"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class FullSyncTestCase(SqlTestCaseLight, TestCase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(FullSyncTestCase, self).setUp()"},{"line_number":34,"context_line":"        self.db_session \u003d neutron_db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_c20bab22","line":31,"in_reply_to":"bab6814e_d64a9bab","updated":"2016-05-22 09:07:50.000000000","message":"Done","commit_id":"e27682843651816d17a34a925186a2eb3f05d4a3"}]}
