)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"824fbf7024436d77d31b3ad960a77edaef7ed9e3","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I0b2f542cb180e71067301ec9a40dab900245c6ac"},{"line_number":13,"context_line":"Signed-off-by: Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":14,"context_line":"Closes-Bug: #1578276"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a122d0e_06650c44","line":14,"updated":"2016-05-04 19:48:03.000000000","message":"Thanks for filing a bug for this.","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"}],"networking_odl/common/config.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    cfg.BoolOpt(\u0027enable_lightweight_testing\u0027,"},{"line_number":38,"context_line":"                default\u003dFalse,"},{"line_number":39,"context_line":"                help\u003d\u0027Test without real ODL\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027maintenance_interval\u0027, default\u003d300,"},{"line_number":41,"context_line":"               help\u003d_(\"(V2 driver) Journal maintenance operations interval \""},{"line_number":42,"context_line":"                      \"in seconds.\")),"},{"line_number":43,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_842370bc","line":40,"updated":"2016-04-21 00:48:31.000000000","message":"Can we group v2 driver related options into one?\nmove before line 37.","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    cfg.BoolOpt(\u0027enable_lightweight_testing\u0027,"},{"line_number":38,"context_line":"                default\u003dFalse,"},{"line_number":39,"context_line":"                help\u003d\u0027Test without real ODL\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027maintenance_interval\u0027, default\u003d300,"},{"line_number":41,"context_line":"               help\u003d_(\"(V2 driver) Journal maintenance operations interval \""},{"line_number":42,"context_line":"                      \"in seconds.\")),"},{"line_number":43,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_ffd6b3c1","line":40,"in_reply_to":"1a122d0e_842370bc","updated":"2016-04-24 08:03:05.000000000","message":"Done","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"af246282504ef83eae290b4e42b68a3f0a52a263","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    cfg.IntOpt(\u0027retry_count\u0027, default\u003d5,"},{"line_number":35,"context_line":"               help\u003d_(\"(V2 driver) Number of times to retry a row \""},{"line_number":36,"context_line":"                      \"before failing.\")),"},{"line_number":37,"context_line":"    cfg.IntOpt(\u0027maintenance_interval\u0027, default\u003d300,"},{"line_number":38,"context_line":"               help\u003d_(\"(V2 driver) Journal maintenance operations interval \""},{"line_number":39,"context_line":"                      \"in seconds.\")),"},{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027enable_lightweight_testing\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_2df3f7e8","line":37,"updated":"2016-05-03 21:42:35.000000000","message":"since this default value will be the minimum time that all registered tasks can wake up, I\u0027m wondering if this should be shorter. The first three are; full sync back to ODL controller, stuck \u0027processing\u0027 rows and removing \u0027completed\u0027 rows from journal. We can always adjust default if needed.","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c1a9faf33f093138e8636bf6ff4ba0b09271327d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    cfg.IntOpt(\u0027retry_count\u0027, default\u003d5,"},{"line_number":35,"context_line":"               help\u003d_(\"(V2 driver) Number of times to retry a row \""},{"line_number":36,"context_line":"                      \"before failing.\")),"},{"line_number":37,"context_line":"    cfg.IntOpt(\u0027maintenance_interval\u0027, default\u003d300,"},{"line_number":38,"context_line":"               help\u003d_(\"(V2 driver) Journal maintenance operations interval \""},{"line_number":39,"context_line":"                      \"in seconds.\")),"},{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027enable_lightweight_testing\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_4e8bb768","line":37,"in_reply_to":"1a122d0e_2df3f7e8","updated":"2016-05-04 12:28:43.000000000","message":"I don\u0027t mind as long as it\u0027s reasonable.\n\nWhat value would you suggest?","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"}],"networking_odl/db/db.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d4fed8391770eff3442ab5ee4fc5fbef80262a2c","unresolved":false,"context_lines":[{"line_number":180,"context_line":"def _update_maintenance_state(session, expected_state, state):"},{"line_number":181,"context_line":"    with session.begin():"},{"line_number":182,"context_line":"        row \u003d session.query(models.OpendaylightMaintenance).filter_by("},{"line_number":183,"context_line":"            state\u003dexpected_state).with_for_update().one()"},{"line_number":184,"context_line":"        if row is None:"},{"line_number":185,"context_line":"            return False"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_4ed4401f","line":183,"updated":"2016-04-13 21:24:46.000000000","message":"one_or_none()\notherwise NoResult exception.\n\nhttp://docs.sqlalchemy.org/en/rel_1_0/orm/query.html#sqlalchemy.orm.query.Query.one","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":180,"context_line":"def _update_maintenance_state(session, expected_state, state):"},{"line_number":181,"context_line":"    with session.begin():"},{"line_number":182,"context_line":"        row \u003d session.query(models.OpendaylightMaintenance).filter_by("},{"line_number":183,"context_line":"            state\u003dexpected_state).with_for_update().one()"},{"line_number":184,"context_line":"        if row is None:"},{"line_number":185,"context_line":"            return False"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_64866fdc","line":183,"in_reply_to":"5a18252c_4ed4401f","updated":"2016-04-14 14:00:56.000000000","message":"You are indeed correct!\n\nDone","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0be9609078c11e39f5f896192c6a396f84edc4f","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            return False"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        row.state \u003d state"},{"line_number":188,"context_line":"        session.merge(row)"},{"line_number":189,"context_line":"        return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_0b3eb18b","line":188,"range":{"start_line":188,"start_character":0,"end_line":188,"end_character":26},"updated":"2016-04-14 02:52:19.000000000","message":"we don\u0027t need the explicitly merge here.","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            return False"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        row.state \u003d state"},{"line_number":188,"context_line":"        session.merge(row)"},{"line_number":189,"context_line":"        return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_c474a369","line":188,"range":{"start_line":188,"start_character":0,"end_line":188,"end_character":26},"in_reply_to":"5a18252c_0b3eb18b","updated":"2016-04-14 14:00:56.000000000","message":"Done","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"cab36e058ffebe9e2e6b936f59c815804247c203","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"def lock_maintenance(session):"},{"line_number":179,"context_line":"    return _update_maintenance_state(session, odl_const.PENDING,"},{"line_number":180,"context_line":"                                     odl_const.PROCESSING)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"def unlock_maintenance(session):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_a33bef9a","line":180,"updated":"2016-04-29 18:41:50.000000000","message":"In case that neutron server is aborted or killed, don\u0027t we need to handle timeout case?","commit_id":"ab552ee11e1691cc1d84c90f9a7e2171d00fdf38"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e1d7d079b4ceb3e4502a52599f639d74abe8fc66","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"def lock_maintenance(session):"},{"line_number":179,"context_line":"    return _update_maintenance_state(session, odl_const.PENDING,"},{"line_number":180,"context_line":"                                     odl_const.PROCESSING)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"def unlock_maintenance(session):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_a6d92b25","line":180,"in_reply_to":"1a122d0e_a33bef9a","updated":"2016-05-01 06:40:49.000000000","message":"You\u0027re correct, and I\u0027ve already thought of this.\n\nI wanted to push the basic infra in this patch and intend to introduce stale lock cleanup in a later patch.","commit_id":"ab552ee11e1691cc1d84c90f9a7e2171d00fdf38"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"af246282504ef83eae290b4e42b68a3f0a52a263","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"@db_api.retry_db_errors"},{"line_number":167,"context_line":"def _update_maintenance_state(session, expected_state, state):"},{"line_number":168,"context_line":"    with session.begin():"},{"line_number":169,"context_line":"        row \u003d session.query(models.OpendaylightMaintenance).filter_by("},{"line_number":170,"context_line":"            state\u003dexpected_state).with_for_update().one_or_none()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_6d14cfe8","line":167,"updated":"2016-05-03 21:42:35.000000000","message":"Consider changing this \u0027state\u0027 variable name so that it doesn\u0027t conflict w/ the column name. Maybe lock_state?","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c1a9faf33f093138e8636bf6ff4ba0b09271327d","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"@db_api.retry_db_errors"},{"line_number":167,"context_line":"def _update_maintenance_state(session, expected_state, state):"},{"line_number":168,"context_line":"    with session.begin():"},{"line_number":169,"context_line":"        row \u003d session.query(models.OpendaylightMaintenance).filter_by("},{"line_number":170,"context_line":"            state\u003dexpected_state).with_for_update().one_or_none()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_4e50d7d4","line":167,"in_reply_to":"1a122d0e_6d14cfe8","updated":"2016-05-04 12:28:43.000000000","message":"This is in line with update_db_row_state which also uses state\n\nI don\u0027t think it\u0027s confusing like this","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"824fbf7024436d77d31b3ad960a77edaef7ed9e3","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            return False"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        row.state \u003d state"},{"line_number":175,"context_line":"        return True"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"def lock_maintenance(session):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_6637a0fe","line":175,"updated":"2016-05-04 19:48:03.000000000","message":"the dangling lock should be salvaged somehow.\nFor now, I\u0027m find with merging this patch. But we surely need to address it.\n\nGiven that such cases are rare, we can provide a script to salvage by running it manually or maintenance thread automatically fixes it.","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"}],"networking_odl/db/migration/alembic_migrations/versions/newton/expand/703dbf02afde_add_journal_maintenance_table.py":[{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0be9609078c11e39f5f896192c6a396f84edc4f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"def upgrade():"},{"line_number":34,"context_line":"    maint_table \u003d op.create_table("},{"line_number":35,"context_line":"        \u0027opendaylight_maintenance\u0027,"},{"line_number":36,"context_line":"        sa.Column(\u0027state\u0027, sa.Enum(\u0027pending\u0027, \u0027processing\u0027), nullable\u003dFalse),"},{"line_number":37,"context_line":"        sa.Column(\u0027canary_network_id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":38,"context_line":"        sa.Column(\u0027lock_updated\u0027, sa.DateTime, nullable\u003dFalse,"},{"line_number":39,"context_line":"                  server_default\u003dsa.func.now(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_4b12690a","line":36,"range":{"start_line":36,"start_character":35,"end_line":36,"end_character":44},"updated":"2016-04-14 02:52:19.000000000","message":"you can also use odl_const here.","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":33,"context_line":"def upgrade():"},{"line_number":34,"context_line":"    maint_table \u003d op.create_table("},{"line_number":35,"context_line":"        \u0027opendaylight_maintenance\u0027,"},{"line_number":36,"context_line":"        sa.Column(\u0027state\u0027, sa.Enum(\u0027pending\u0027, \u0027processing\u0027), nullable\u003dFalse),"},{"line_number":37,"context_line":"        sa.Column(\u0027canary_network_id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":38,"context_line":"        sa.Column(\u0027lock_updated\u0027, sa.DateTime, nullable\u003dFalse,"},{"line_number":39,"context_line":"                  server_default\u003dsa.func.now(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_3fff54ab","line":36,"range":{"start_line":36,"start_character":35,"end_line":36,"end_character":44},"in_reply_to":"5a18252c_4b12690a","updated":"2016-04-14 14:00:56.000000000","message":"Done","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0be9609078c11e39f5f896192c6a396f84edc4f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    # Insert the one and only row with a pre-set canary network UUID"},{"line_number":44,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":45,"context_line":"                   [{\u0027state\u0027: \u0027pending\u0027,"},{"line_number":46,"context_line":"                     \u0027canary_network_id\u0027: uuidutils.generate_uuid()}])"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_2b2e0d43","line":46,"range":{"start_line":46,"start_character":41,"end_line":46,"end_character":65},"updated":"2016-04-14 02:52:19.000000000","message":"do we want to use the preset id?\nwould the preset id conflict with the real neutron net id?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    # Insert the one and only row with a pre-set canary network UUID"},{"line_number":44,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":45,"context_line":"                   [{\u0027state\u0027: \u0027pending\u0027,"},{"line_number":46,"context_line":"                     \u0027canary_network_id\u0027: uuidutils.generate_uuid()}])"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_bf5b64f5","line":46,"range":{"start_line":46,"start_character":41,"end_line":46,"end_character":65},"in_reply_to":"5a18252c_2b2e0d43","updated":"2016-04-14 14:00:56.000000000","message":"It\u0027s best to set it here to have simpler code.\n\nSince it\u0027s a UUID if it ever conflicts with another UUID then the universe might be collapsing..","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"8f6401947d522f4cb8c0b228f832570229d0545e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        sa.Column(\u0027state\u0027, sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":39,"context_line":"                  nullable\u003dFalse),"},{"line_number":40,"context_line":"        sa.Column(\u0027lock_updated\u0027, sa.DateTime, nullable\u003dFalse,"},{"line_number":41,"context_line":"                  server_default\u003dsa.func.now(),"},{"line_number":42,"context_line":"                  onupdate\u003dsa.func.now())"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_6ac7f195","line":41,"range":{"start_line":41,"start_character":18,"end_line":41,"end_character":32},"updated":"2016-04-21 07:38:17.000000000","message":"you may want to s/server_default/default/ here","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        sa.Column(\u0027state\u0027, sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":39,"context_line":"                  nullable\u003dFalse),"},{"line_number":40,"context_line":"        sa.Column(\u0027lock_updated\u0027, sa.DateTime, nullable\u003dFalse,"},{"line_number":41,"context_line":"                  server_default\u003dsa.func.now(),"},{"line_number":42,"context_line":"                  onupdate\u003dsa.func.now())"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_7fbf4360","line":41,"range":{"start_line":41,"start_character":18,"end_line":41,"end_character":32},"in_reply_to":"1a122d0e_6ac7f195","updated":"2016-04-24 08:03:05.000000000","message":"It was a problem with the column type, changed to timestamp.\n\nFYI it\u0027s advisable to use server_default per:\nhttp://docs.openstack.org/developer/neutron/devref/db_layer.html","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"cab36e058ffebe9e2e6b936f59c815804247c203","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                  onupdate\u003dsa.func.now())"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # Insert the one and only row with a pre-set canary network UUID"},{"line_number":46,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":47,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":48,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_43b13b46","line":45,"updated":"2016-04-29 18:41:50.000000000","message":"please update the comment.\nthis is not \"canary network\"","commit_id":"ab552ee11e1691cc1d84c90f9a7e2171d00fdf38"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e1d7d079b4ceb3e4502a52599f639d74abe8fc66","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                  onupdate\u003dsa.func.now())"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # Insert the one and only row with a pre-set canary network UUID"},{"line_number":46,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":47,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":48,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_0601ff6a","line":45,"in_reply_to":"1a122d0e_43b13b46","updated":"2016-05-01 06:40:49.000000000","message":"Done","commit_id":"ab552ee11e1691cc1d84c90f9a7e2171d00fdf38"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"af246282504ef83eae290b4e42b68a3f0a52a263","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 \u003cPUT YOUR NAME/COMPANY HERE\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_edde1f3d","line":1,"updated":"2016-05-03 21:42:35.000000000","message":"Change to \"Openstack Foundation\"","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c1a9faf33f093138e8636bf6ff4ba0b09271327d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 \u003cPUT YOUR NAME/COMPANY HERE\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_48be0a00","line":1,"in_reply_to":"1a122d0e_edde1f3d","updated":"2016-05-04 12:28:43.000000000","message":"Done","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"af246282504ef83eae290b4e42b68a3f0a52a263","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # Insert the only row here that is used to synchronize the lock between"},{"line_number":46,"context_line":"    # different Neutron processes."},{"line_number":47,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":48,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":49,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_6da7afa7","line":46,"updated":"2016-05-03 21:42:35.000000000","message":"Consider changing \u0027processes\u0027 to \u0027controllers\u0027. May confuse people that think api/rpc workers impact this design when it\u0027s really an HA deployment.","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c1a9faf33f093138e8636bf6ff4ba0b09271327d","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # Insert the only row here that is used to synchronize the lock between"},{"line_number":46,"context_line":"    # different Neutron processes."},{"line_number":47,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":48,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":49,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_e81a7617","line":46,"in_reply_to":"1a122d0e_6da7afa7","updated":"2016-05-04 12:28:43.000000000","message":"At this level deep down we can\u0027t know is multiple workers does or doesn\u0027t affect this.\n\nI can remove this comment entirely if it\u0027s bothering you.","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"d146d569c5d8f6caa6f472f2e11a0546692af575","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Red Hat Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_a15a59f0","line":1,"updated":"2016-05-04 13:25:22.000000000","message":"This still doesn\u0027t seem right to me, adding a company name to networking-odl.\nI\u0027ll let others comment.","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"d146d569c5d8f6caa6f472f2e11a0546692af575","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    )"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    # Insert the only row here that is used to synchronize the lock between"},{"line_number":47,"context_line":"    # different Neutron processes."},{"line_number":48,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":49,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":50,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_812abde5","line":47,"updated":"2016-05-04 13:25:22.000000000","message":"I don\u0027t really care if this comment stays or not. But maybe I\u0027m missing something w/ why this db is required. In a single controller deployment there would only be one maintenance thread running and no need for the db. In HA, the db is required so that only one maintenance thread would be allowed to call all the registered operations. Is this correct?","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"a35677d73374ee4707763ef604df4564b8e32566","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    )"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    # Insert the only row here that is used to synchronize the lock between"},{"line_number":47,"context_line":"    # different Neutron processes."},{"line_number":48,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":49,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":50,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_3c44acb5","line":47,"in_reply_to":"1a122d0e_4181c58e","updated":"2016-05-04 13:54:03.000000000","message":"This code is a part of the neutron/ ml2 infrastructure. We know that by design the initialize() method will always only be called once per driver. That\u0027s why Bob K. created it. If this changes, a lot of ml2 drivers may break.","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"7af51b86bd8e44bb4b02ec26722e8a45e4379e58","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    )"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    # Insert the only row here that is used to synchronize the lock between"},{"line_number":47,"context_line":"    # different Neutron processes."},{"line_number":48,"context_line":"    op.bulk_insert(maint_table,"},{"line_number":49,"context_line":"                   [{\u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":50,"context_line":"                     \u0027state\u0027: odl_const.PENDING}])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_4181c58e","line":47,"in_reply_to":"1a122d0e_812abde5","updated":"2016-05-04 13:30:18.000000000","message":"In theory there could be a thread per process there.\n\nWe\u0027re very far from the Plugin initialization code and can\u0027t know for sure if there\u0027s a thread per process or thread per controller..","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"}],"networking_odl/db/models.py":[{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0be9609078c11e39f5f896192c6a396f84edc4f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                             onupdate\u003dsa.func.now())"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class OpendaylightMaintenance(model_base.BASEV2, HasId):"},{"line_number":40,"context_line":"    __tablename__ \u003d \u0027opendaylight_maintenance\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_4b29c936","line":39,"range":{"start_line":39,"start_character":48,"end_line":39,"end_character":54},"updated":"2016-04-14 02:52:19.000000000","message":"id only works as primary key here? could we remove it?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                             onupdate\u003dsa.func.now())"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class OpendaylightMaintenance(model_base.BASEV2, HasId):"},{"line_number":40,"context_line":"    __tablename__ \u003d \u0027opendaylight_maintenance\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_5f769006","line":39,"range":{"start_line":39,"start_character":48,"end_line":39,"end_character":54},"in_reply_to":"5a18252c_4b29c936","updated":"2016-04-14 14:00:56.000000000","message":"SA complains if there\u0027s no primary key..\n\nI wanted to keep it simple so I used this base class, but if you have a better suggestion I don\u0027t mind changing it.","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"8f6401947d522f4cb8c0b228f832570229d0545e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":43,"context_line":"                      nullable\u003dFalse)"},{"line_number":44,"context_line":"    lock_updated \u003d sa.Column(sa.DateTime, nullable\u003dFalse,"},{"line_number":45,"context_line":"                             server_default\u003dsa.func.now(),"},{"line_number":46,"context_line":"                             onupdate\u003dsa.func.now())"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_0a43dd13","line":45,"range":{"start_line":45,"start_character":29,"end_line":45,"end_character":43},"updated":"2016-04-21 07:38:17.000000000","message":"use server_default is meaningless in models file, you can use \u0027default\u0027","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":43,"context_line":"                      nullable\u003dFalse)"},{"line_number":44,"context_line":"    lock_updated \u003d sa.Column(sa.DateTime, nullable\u003dFalse,"},{"line_number":45,"context_line":"                             server_default\u003dsa.func.now(),"},{"line_number":46,"context_line":"                             onupdate\u003dsa.func.now())"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_1fb1ef8f","line":45,"range":{"start_line":45,"start_character":29,"end_line":45,"end_character":43},"in_reply_to":"1a122d0e_0a43dd13","updated":"2016-04-24 08:03:05.000000000","message":"Changed to timestamp","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5ee63ab768a2d1a0220d64a2d98ef518ff39707f","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":43,"context_line":"                      nullable\u003dFalse)"},{"line_number":44,"context_line":"    lock_updated \u003d sa.Column(sa.TIMESTAMP, nullable\u003dFalse,"},{"line_number":45,"context_line":"                             server_default\u003dsa.func.now(),"},{"line_number":46,"context_line":"                             onupdate\u003dsa.func.now())"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_a4bed5fd","line":44,"updated":"2016-05-04 18:27:07.000000000","message":"Is this column for debug purposes?","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"76a3737153e7828d2ca69965d066acb881b54656","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":43,"context_line":"                      nullable\u003dFalse)"},{"line_number":44,"context_line":"    lock_updated \u003d sa.Column(sa.TIMESTAMP, nullable\u003dFalse,"},{"line_number":45,"context_line":"                             server_default\u003dsa.func.now(),"},{"line_number":46,"context_line":"                             onupdate\u003dsa.func.now())"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_78044b7d","line":44,"in_reply_to":"1a122d0e_7f11e45c","updated":"2016-05-08 13:01:05.000000000","message":"As Isaku said it\u0027s a bit of future-proofing to avoid adding this column in another migration script when we add salvaging for stale locks here.","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"824fbf7024436d77d31b3ad960a77edaef7ed9e3","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    state \u003d sa.Column(sa.Enum(odl_const.PENDING, odl_const.PROCESSING),"},{"line_number":43,"context_line":"                      nullable\u003dFalse)"},{"line_number":44,"context_line":"    lock_updated \u003d sa.Column(sa.TIMESTAMP, nullable\u003dFalse,"},{"line_number":45,"context_line":"                             server_default\u003dsa.func.now(),"},{"line_number":46,"context_line":"                             onupdate\u003dsa.func.now())"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_7f11e45c","line":44,"in_reply_to":"1a122d0e_a4bed5fd","updated":"2016-05-04 19:48:03.000000000","message":"No. This is necessary.\nNeutron server process can die during holding this lock.\nSo it needs to be salvaged by timeout.","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"}],"networking_odl/journal/maintenance.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d4fed8391770eff3442ab5ee4fc5fbef80262a2c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class MaintenanceThread(Thread):"},{"line_number":24,"context_line":"    def __init__(self, event, journal):"},{"line_number":25,"context_line":"        Thread.__init__(self)"},{"line_number":26,"context_line":"        self.stopped \u003d event"},{"line_number":27,"context_line":"        self.journal \u003d journal"},{"line_number":28,"context_line":"        self.maintenance_interval \u003d cfg.CONF.ml2_odl.maintenance_interval"},{"line_number":29,"context_line":"        self.maintenance_ops \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_4ede0012","line":26,"updated":"2016-04-13 21:24:46.000000000","message":"Do we need to pass event object from the caller?\nCan we just add stop method to this class and instantiate Event object in contructor?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class MaintenanceThread(Thread):"},{"line_number":24,"context_line":"    def __init__(self, event, journal):"},{"line_number":25,"context_line":"        Thread.__init__(self)"},{"line_number":26,"context_line":"        self.stopped \u003d event"},{"line_number":27,"context_line":"        self.journal \u003d journal"},{"line_number":28,"context_line":"        self.maintenance_interval \u003d cfg.CONF.ml2_odl.maintenance_interval"},{"line_number":29,"context_line":"        self.maintenance_ops \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_9f62e83c","line":26,"in_reply_to":"5a18252c_4ede0012","updated":"2016-04-14 14:00:56.000000000","message":"Done","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d4fed8391770eff3442ab5ee4fc5fbef80262a2c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.maintenance_ops \u003d []"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def run(self):"},{"line_number":32,"context_line":"        while not self.stopped.wait(self.maintenance_interval):"},{"line_number":33,"context_line":"            session \u003d neutron_db_api.get_session()"},{"line_number":34,"context_line":"            if not db.lock_maintenance(session):"},{"line_number":35,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_6eaf7c94","line":32,"updated":"2016-04-13 21:24:46.000000000","message":"oslo_service.periodic_task?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.maintenance_ops \u003d []"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def run(self):"},{"line_number":32,"context_line":"        while not self.stopped.wait(self.maintenance_interval):"},{"line_number":33,"context_line":"            session \u003d neutron_db_api.get_session()"},{"line_number":34,"context_line":"            if not db.lock_maintenance(session):"},{"line_number":35,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_8ba3c6b1","line":32,"in_reply_to":"5a18252c_6eaf7c94","updated":"2016-04-14 14:00:56.000000000","message":"Switched to oslo_service.loopingcall.FixedIntervalLoopingCall","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"85b40e856eab3463457f28eba0e217554551c68b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.maintenance_ops \u003d []"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def run(self):"},{"line_number":32,"context_line":"        while not self.stopped.wait(self.maintenance_interval):"},{"line_number":33,"context_line":"            session \u003d neutron_db_api.get_session()"},{"line_number":34,"context_line":"            if not db.lock_maintenance(session):"},{"line_number":35,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_114d4d6c","line":32,"in_reply_to":"5a18252c_6eaf7c94","updated":"2016-04-13 21:45:26.000000000","message":"is this event cleared anywhere?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"85b40e856eab3463457f28eba0e217554551c68b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            finally:"},{"line_number":41,"context_line":"                db.unlock_maintenance(session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def register_operation(self, operation):"},{"line_number":44,"context_line":"        self.maintenance_ops.append(operation)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_d16915c0","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":26},"updated":"2016-04-13 21:45:26.000000000","message":"Where is this method called?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d4fed8391770eff3442ab5ee4fc5fbef80262a2c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            finally:"},{"line_number":41,"context_line":"                db.unlock_maintenance(session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def register_operation(self, operation):"},{"line_number":44,"context_line":"        self.maintenance_ops.append(operation)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_ee9b8c70","line":43,"updated":"2016-04-13 21:24:46.000000000","message":"neutron callback?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            finally:"},{"line_number":41,"context_line":"                db.unlock_maintenance(session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def register_operation(self, operation):"},{"line_number":44,"context_line":"        self.maintenance_ops.append(operation)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_efad219c","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":26},"in_reply_to":"5a18252c_6be645b1","updated":"2016-04-14 14:00:56.000000000","message":"I added a docstring to describe what\u0027s there.\n\nCurrently it\u0027s only called by tests but should be called for registering the maintenance operations such as full sync.","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0be9609078c11e39f5f896192c6a396f84edc4f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            finally:"},{"line_number":41,"context_line":"                db.unlock_maintenance(session)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def register_operation(self, operation):"},{"line_number":44,"context_line":"        self.maintenance_ops.append(operation)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_6be645b1","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":26},"in_reply_to":"5a18252c_d16915c0","updated":"2016-04-14 02:52:19.000000000","message":"+1\nhow to use this function?","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":19348,"name":"Oded Shvartz","email":"oshvartz@redhat.com","username":"oshvartz"},"change_message_id":"ae0775504aba1ec700a8f1c31005a64c5bee8c44","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            LOG.info(_LI(\"Finished journal maintenance run.\"))"},{"line_number":54,"context_line":"        except Exception:"},{"line_number":55,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":56,"context_line":"                LOG.exception(_LE(\"Got exception while running journal\""},{"line_number":57,"context_line":"                                  \"maintenance!\"))"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_c5d798bd","line":55,"range":{"start_line":55,"start_character":12,"end_line":55,"end_character":54},"updated":"2016-04-19 07:23:40.000000000","message":"What should the timer do with the exception ?","commit_id":"8437f6e639d71ffb011defec7939e4b8a122e465"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"7d4be5de7f983ea72db52669aa70127c349b3b21","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            LOG.info(_LI(\"Finished journal maintenance run.\"))"},{"line_number":54,"context_line":"        except Exception:"},{"line_number":55,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":56,"context_line":"                LOG.exception(_LE(\"Got exception while running journal\""},{"line_number":57,"context_line":"                                  \"maintenance!\"))"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_33d4cd45","line":55,"range":{"start_line":55,"start_character":12,"end_line":55,"end_character":54},"in_reply_to":"1a122d0e_c5d798bd","updated":"2016-04-19 09:23:32.000000000","message":"Done","commit_id":"8437f6e639d71ffb011defec7939e4b8a122e465"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from networking_odl._i18n import _LI"},{"line_number":19,"context_line":"from networking_odl.db import db"},{"line_number":20,"context_line":"from neutron.db import api as neutron_db_api"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_387b9c7c","line":19,"updated":"2016-04-21 00:48:31.000000000","message":"please separate project import.\nhttp://docs.openstack.org/developer/hacking/#imports","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from networking_odl._i18n import _LI"},{"line_number":19,"context_line":"from networking_odl.db import db"},{"line_number":20,"context_line":"from neutron.db import api as neutron_db_api"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_3fa66b53","line":19,"in_reply_to":"1a122d0e_387b9c7c","updated":"2016-04-24 08:03:05.000000000","message":"Done","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        LOG.info(_LI(\"Starting journal maintenance run.\"))"},{"line_number":41,"context_line":"        session \u003d neutron_db_api.get_session()"},{"line_number":42,"context_line":"        if not db.lock_maintenance(session):"},{"line_number":43,"context_line":"            return"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        try:"},{"line_number":46,"context_line":"            for operation in self.maintenance_ops:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_988ab062","line":43,"updated":"2016-04-21 00:48:31.000000000","message":"Do we want to log here?","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        LOG.info(_LI(\"Starting journal maintenance run.\"))"},{"line_number":41,"context_line":"        session \u003d neutron_db_api.get_session()"},{"line_number":42,"context_line":"        if not db.lock_maintenance(session):"},{"line_number":43,"context_line":"            return"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        try:"},{"line_number":46,"context_line":"            for operation in self.maintenance_ops:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_9f633f1a","line":43,"in_reply_to":"1a122d0e_988ab062","updated":"2016-04-24 08:03:05.000000000","message":"Done","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"cab36e058ffebe9e2e6b936f59c815804247c203","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        finally:"},{"line_number":51,"context_line":"            db.unlock_maintenance(session)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        LOG.info(_LI(\"Finished journal maintenance run.\"))"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def register_operation(self, f):"},{"line_number":56,"context_line":"        \"\"\"Register a function to be run by the maintenance thread."}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_a3d48f46","line":53,"updated":"2016-04-29 18:41:50.000000000","message":"In case of exception, we\u0027d like to have this log under finally clause.","commit_id":"ab552ee11e1691cc1d84c90f9a7e2171d00fdf38"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"e1d7d079b4ceb3e4502a52599f639d74abe8fc66","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        finally:"},{"line_number":51,"context_line":"            db.unlock_maintenance(session)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        LOG.info(_LI(\"Finished journal maintenance run.\"))"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def register_operation(self, f):"},{"line_number":56,"context_line":"        \"\"\"Register a function to be run by the maintenance thread."}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_86ed0fba","line":53,"in_reply_to":"1a122d0e_a3d48f46","updated":"2016-05-01 06:40:49.000000000","message":"IMHO this log line signifies success but I don\u0027t mind moving it into the finally.\n\nException will be logged anyhow by the FixedIntervalLoopingCall","commit_id":"ab552ee11e1691cc1d84c90f9a7e2171d00fdf38"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"af246282504ef83eae290b4e42b68a3f0a52a263","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_0de6fbe7","line":2,"updated":"2016-05-03 21:42:35.000000000","message":"I think this should change to \"Openstack Foundation\"","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c1a9faf33f093138e8636bf6ff4ba0b09271327d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_0872527c","line":2,"in_reply_to":"1a122d0e_0de6fbe7","updated":"2016-05-04 12:28:43.000000000","message":"I\u0027m not an employee of the foundation so I can\u0027t claim copyright in it\u0027s name..","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"09f3a43123693703db2e1c193f3ca99125d9c998","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_21fe49ae","line":2,"range":{"start_line":2,"start_character":21,"end_line":2,"end_character":28},"updated":"2016-05-04 13:21:58.000000000","message":"Mike,\n\nPlease refer to https://wiki.openstack.org/wiki/LegalIssuesFAQ#Copyright_Headers\n\nThe general guideline is to copyright it to the Foundation since you signed the CLA. Copyrighting by individual companies is acceptable if this code has been imported from outside and the copyright needs to be preserved.","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"7af51b86bd8e44bb4b02ec26722e8a45e4379e58","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_e1d571b7","line":2,"range":{"start_line":2,"start_character":21,"end_line":2,"end_character":28},"in_reply_to":"1a122d0e_21fe49ae","updated":"2016-05-04 13:30:18.000000000","message":"Actually there\u0027s no such a restriction there. Specifically:\n We do not yet have guidance for when to add or remove a copyright header in source files. \n\nActually if you look a bit further at https://wiki.openstack.org/wiki/LegalIssuesFAQ#OpenStack_Foundation_Copyright_Headers\nYou will notice that they specifically say you shouldn\u0027t write copyright to the foundation unless you\u0027re an employee..\n\nLooking at Neutron master as an example, I see recent files have varying names there or no copyright notice at all.","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"0dc93f7ef6ec584a42133087d8f73d7497013631","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_d70e33e4","line":2,"range":{"start_line":2,"start_character":21,"end_line":2,"end_character":28},"in_reply_to":"1a122d0e_e1d571b7","updated":"2016-05-04 13:52:28.000000000","message":"Just checked neutron, you\u0027re right .. it seems to be across the board. I\u0027ll remove the -1.","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5ee63ab768a2d1a0220d64a2d98ef518ff39707f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        LOG.info(_LI(\"Starting journal maintenance run.\"))"},{"line_number":41,"context_line":"        session \u003d neutron_db_api.get_session()"},{"line_number":42,"context_line":"        if not db.lock_maintenance(session):"},{"line_number":43,"context_line":"            LOG.info(_LI(\"Failed to acquire lock, aborting maintenance run.\"))"},{"line_number":44,"context_line":"            return"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_29145e9d","line":43,"updated":"2016-05-04 18:27:07.000000000","message":"Consider \"aborting maintenance run\" w/ \"maintenance run already in progress. Returning.\"","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"76a3737153e7828d2ca69965d066acb881b54656","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        LOG.info(_LI(\"Starting journal maintenance run.\"))"},{"line_number":41,"context_line":"        session \u003d neutron_db_api.get_session()"},{"line_number":42,"context_line":"        if not db.lock_maintenance(session):"},{"line_number":43,"context_line":"            LOG.info(_LI(\"Failed to acquire lock, aborting maintenance run.\"))"},{"line_number":44,"context_line":"            return"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_68d8f053","line":43,"in_reply_to":"1a122d0e_29145e9d","updated":"2016-05-08 13:01:05.000000000","message":"Done","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5ee63ab768a2d1a0220d64a2d98ef518ff39707f","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            for operation in self.maintenance_ops:"},{"line_number":48,"context_line":"                operation(session\u003dsession)"},{"line_number":49,"context_line":"        finally:"},{"line_number":50,"context_line":"            db.unlock_maintenance(session)"},{"line_number":51,"context_line":"            LOG.info(_LI(\"Finished journal maintenance run.\"))"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_69f5b6eb","line":48,"updated":"2016-05-04 18:27:07.000000000","message":"We may want to consider adding try, except code around the operation() call. We already have three (full sync, cleanup rows, stuck processing rows) registered tasks that use the maintenance thread. If the first one registered throws an exception the next two will never be run.","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"76a3737153e7828d2ca69965d066acb881b54656","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            for operation in self.maintenance_ops:"},{"line_number":48,"context_line":"                operation(session\u003dsession)"},{"line_number":49,"context_line":"        finally:"},{"line_number":50,"context_line":"            db.unlock_maintenance(session)"},{"line_number":51,"context_line":"            LOG.info(_LI(\"Finished journal maintenance run.\"))"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_08e85ce1","line":48,"in_reply_to":"1a122d0e_4636e451","updated":"2016-05-08 13:01:05.000000000","message":"Done\n\nFor the locking time renewal I added a column \"processing operation\" which is updated with the current operation.\nThis is good for debugging, but mostly it was necessary to update something for the row to be updated..","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"824fbf7024436d77d31b3ad960a77edaef7ed9e3","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            for operation in self.maintenance_ops:"},{"line_number":48,"context_line":"                operation(session\u003dsession)"},{"line_number":49,"context_line":"        finally:"},{"line_number":50,"context_line":"            db.unlock_maintenance(session)"},{"line_number":51,"context_line":"            LOG.info(_LI(\"Finished journal maintenance run.\"))"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_4636e451","line":48,"in_reply_to":"1a122d0e_69f5b6eb","updated":"2016-05-04 19:48:03.000000000","message":"+1\nMaybe we\u0027d like to also log time which each operation takes so that we can get an idea on timeout.\n\nProbably on each operation, we\u0027d like to update time of locking row.","commit_id":"b215e1a79ad7a8f0f2585710f5b6b83229289acf"}],"networking_odl/ml2/mech_driver_v2.py":[{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"85b40e856eab3463457f28eba0e217554551c68b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.sg_handler \u003d callback.OdlSecurityGroupsHandler(self)"},{"line_number":46,"context_line":"        self.vif_details \u003d {portbindings.CAP_PORT_FILTER: True}"},{"line_number":47,"context_line":"        self.journal \u003d journal.OpendaylightJournalThread()"},{"line_number":48,"context_line":"        self._stop_maintenance \u003d threading.Event()"},{"line_number":49,"context_line":"        self._maintenance_thread \u003d maintenance.MaintenanceThread("},{"line_number":50,"context_line":"            self._stop_maintenance, self.journal)"},{"line_number":51,"context_line":"        self._maintenance_thread.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_2e990420","line":48,"range":{"start_line":48,"start_character":33,"end_line":48,"end_character":42},"updated":"2016-04-13 21:45:26.000000000","message":"Put all the threading logic into maintenance similar to the journal stuff for consistency.","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c5dc817a23dd96d2177cae2a0d9f76eff7c488c3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.sg_handler \u003d callback.OdlSecurityGroupsHandler(self)"},{"line_number":46,"context_line":"        self.vif_details \u003d {portbindings.CAP_PORT_FILTER: True}"},{"line_number":47,"context_line":"        self.journal \u003d journal.OpendaylightJournalThread()"},{"line_number":48,"context_line":"        self._stop_maintenance \u003d threading.Event()"},{"line_number":49,"context_line":"        self._maintenance_thread \u003d maintenance.MaintenanceThread("},{"line_number":50,"context_line":"            self._stop_maintenance, self.journal)"},{"line_number":51,"context_line":"        self._maintenance_thread.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_2b8f12cd","line":48,"range":{"start_line":48,"start_character":33,"end_line":48,"end_character":42},"in_reply_to":"5a18252c_2e990420","updated":"2016-04-14 14:00:56.000000000","message":"Done","commit_id":"6b1c7c6a06084c985496cddf291a818a7e589215"}],"networking_odl/tests/unit/db/test_db.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def test_update_row_state_to_completed(self):"},{"line_number":181,"context_line":"        self._test_update_row_state(odl_const.PROCESSING, odl_const.COMPLETED)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _test_maintenance_lock_unlock(self, db_func, existing_state,"},{"line_number":184,"context_line":"                                      expected_state, expected_result):"},{"line_number":185,"context_line":"        row \u003d models.OpendaylightMaintenance(id\u003d\u0027test\u0027,"},{"line_number":186,"context_line":"                                             state\u003dexisting_state)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_18cce0b9","line":183,"updated":"2016-04-21 00:48:31.000000000","message":"As those tests are dedicated to OpendaylightMaintenance, can we introduce new test class instead of bloating DbTestCase?","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def test_update_row_state_to_completed(self):"},{"line_number":181,"context_line":"        self._test_update_row_state(odl_const.PROCESSING, odl_const.COMPLETED)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _test_maintenance_lock_unlock(self, db_func, existing_state,"},{"line_number":184,"context_line":"                                      expected_state, expected_result):"},{"line_number":185,"context_line":"        row \u003d models.OpendaylightMaintenance(id\u003d\u0027test\u0027,"},{"line_number":186,"context_line":"                                             state\u003dexisting_state)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_9f4a1f82","line":183,"in_reply_to":"1a122d0e_18cce0b9","updated":"2016-04-24 08:03:05.000000000","message":"These are tests for the db method which was added in db.py\n\nDo you suggest to add another module for DB instead of adding to db.py?\n\nIt is possible though a bit unnecessary at this point.\n\nIf that\u0027s your intention please let me know.","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"}],"networking_odl/tests/unit/journal/__init__.py":[{"author":{"_account_id":19348,"name":"Oded Shvartz","email":"oshvartz@redhat.com","username":"oshvartz"},"change_message_id":"ac554ad6743171aa029092741bb6532933a53a18","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1a122d0e_1f0b622b","line":1,"updated":"2016-04-20 05:46:40.000000000","message":"I can see that the file mode was changed.\nWas it on purpose ?","commit_id":"7e370eeb07c22d0af501dfa2a30dca60d0a5576c"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"9e446909a23f82a057537d77f6f4ffb0f577886e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1a122d0e_3afbccc2","line":1,"in_reply_to":"1a122d0e_1f0b622b","updated":"2016-04-20 05:59:14.000000000","message":"What do you mean?\n\nThis is a new file it didn\u0027t exist before..","commit_id":"7e370eeb07c22d0af501dfa2a30dca60d0a5576c"}],"networking_odl/tests/unit/journal/test_maintenance.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":21,"context_line":"from networking_odl.db import models"},{"line_number":22,"context_line":"from networking_odl.journal import maintenance"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from neutron.db import api as neutron_db_api"},{"line_number":25,"context_line":"from neutron.tests.unit.testlib_api import SqlTestCaseLight"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_d83c2895","line":22,"updated":"2016-04-21 00:48:31.000000000","message":"import order.\nhttp://docs.openstack.org/developer/hacking/#imports","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":21,"context_line":"from networking_odl.db import models"},{"line_number":22,"context_line":"from networking_odl.journal import maintenance"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from neutron.db import api as neutron_db_api"},{"line_number":25,"context_line":"from neutron.tests.unit.testlib_api import SqlTestCaseLight"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_bf471b76","line":22,"in_reply_to":"1a122d0e_d83c2895","updated":"2016-04-24 08:03:05.000000000","message":"Done","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.addCleanup(self._stop_thread)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _stop_thread(self):"},{"line_number":44,"context_line":"        self.stopEvent.set()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_thread_works(self):"},{"line_number":47,"context_line":"        callback_event \u003d threading.Event()"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_380efce4","line":44,"updated":"2016-04-21 00:48:31.000000000","message":"What\u0027s the effect?\n\nself.thread.timer.stop()\nself.thread.timer.wait()\n?","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.addCleanup(self._stop_thread)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _stop_thread(self):"},{"line_number":44,"context_line":"        self.stopEvent.set()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_thread_works(self):"},{"line_number":47,"context_line":"        callback_event \u003d threading.Event()"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_ff59935c","line":44,"in_reply_to":"1a122d0e_380efce4","updated":"2016-04-24 08:03:05.000000000","message":"Not sure what you mean..\n\nThis will stop the thread from executing.","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"297bcb343bfec92b2d49d58b3891cd29138457e7","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_thread_works(self):"},{"line_number":47,"context_line":"        callback_event \u003d threading.Event()"},{"line_number":48,"context_line":"        count \u003d [0]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        def callback_op(**kwargs):"},{"line_number":51,"context_line":"            count[0] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_38255c5b","line":48,"updated":"2016-04-21 00:48:31.000000000","message":"count \u003d 0 doesn\u0027t work?","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"725504541882774933e981ac352cc5e4240a529f","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_thread_works(self):"},{"line_number":47,"context_line":"        callback_event \u003d threading.Event()"},{"line_number":48,"context_line":"        count \u003d [0]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        def callback_op(**kwargs):"},{"line_number":51,"context_line":"            count[0] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_9f317f0e","line":48,"in_reply_to":"1a122d0e_38255c5b","updated":"2016-04-24 08:03:05.000000000","message":"It\u0027s a quirk in Python related to the scoping of variables..\n\nIf it were Python 3 only code we could use nonlocal keyword, but for now some hackery has to be done..\n\nFor example (out of many) see this blog post: https://technotroph.wordpress.com/2012/10/01/python-closures-and-the-python-2-7-nonlocal-solution/","commit_id":"5202f35bffada49eb20a469ed407b89eb5184ccd"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"af246282504ef83eae290b4e42b68a3f0a52a263","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_2d393740","line":2,"updated":"2016-05-03 21:42:35.000000000","message":"Change to \"Openstack Foundation\"","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c1a9faf33f093138e8636bf6ff4ba0b09271327d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_4803aab8","line":2,"in_reply_to":"1a122d0e_2d393740","updated":"2016-05-04 12:28:43.000000000","message":"I\u0027m not an employee of the foundation so I can\u0027t claim copyright in it\u0027s name..","commit_id":"42c1e2ced427d3c544f591ceb4e31ffeb8d94275"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"09f3a43123693703db2e1c193f3ca99125d9c998","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright (C) 2016 Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#  not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_81d2bd32","line":2,"range":{"start_line":2,"start_character":21,"end_line":2,"end_character":28},"updated":"2016-05-04 13:21:58.000000000","message":"Same comment as maintenance.py copyright.","commit_id":"878aa2c89f61c33e49f68e7b7562a80a8be85ffb"}]}
