)]}'
{"networking_odl/db/db.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"74503d1837245c4e2d6dbf9bbc232c1e51fda49c","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def reset_processing_rows(session, max_timedelta):"},{"line_number":217,"context_line":"    with session.begin():"},{"line_number":218,"context_line":"        now \u003d session.execute(func.now()).scalar()"},{"line_number":219,"context_line":"        max_timedelta \u003d datetime.timedelta(seconds\u003dmax_timedelta)"},{"line_number":220,"context_line":"        rows \u003d session.query(models.OpenDaylightJournal).filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_4adedf11","line":217,"updated":"2017-08-24 23:28:59.000000000","message":"Please add a comment on why updating state one-by-one.\nOtherwise it\u0027s difficult to understand it.","commit_id":"fb9f7f6ae74688c0232964267a723ce1d9fae036"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"54019c2e5bdd44adb75dad6ca360f23cc9e07114","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def reset_processing_rows(session, max_timedelta):"},{"line_number":217,"context_line":"    with session.begin():"},{"line_number":218,"context_line":"        now \u003d session.execute(func.now()).scalar()"},{"line_number":219,"context_line":"        max_timedelta \u003d datetime.timedelta(seconds\u003dmax_timedelta)"},{"line_number":220,"context_line":"        rows \u003d session.query(models.OpenDaylightJournal).filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_3b1ce0bf","line":217,"in_reply_to":"7f287b81_4adedf11","updated":"2017-08-27 08:05:38.000000000","message":"Well, there is the commit message which explains it.\n\nDONE","commit_id":"fb9f7f6ae74688c0232964267a723ce1d9fae036"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"74503d1837245c4e2d6dbf9bbc232c1e51fda49c","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        rows \u003d session.query(models.OpenDaylightJournal).filter("},{"line_number":221,"context_line":"            models.OpenDaylightJournal.last_retried \u003c now - max_timedelta,"},{"line_number":222,"context_line":"            models.OpenDaylightJournal.state \u003d\u003d odl_const.PROCESSING).all()"},{"line_number":223,"context_line":"        for row in rows:"},{"line_number":224,"context_line":"            update_db_row_state(session, row, odl_const.PENDING)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    return len(rows)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_8ac60748","line":224,"range":{"start_line":223,"start_character":0,"end_line":224,"end_character":64},"updated":"2017-08-24 23:28:59.000000000","message":"update_db_row_state issues flush().\nDo you want flush one-by-one within a transaction?\n\nAlso is it intentional that this is called under a transaction?","commit_id":"fb9f7f6ae74688c0232964267a723ce1d9fae036"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"54019c2e5bdd44adb75dad6ca360f23cc9e07114","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        rows \u003d session.query(models.OpenDaylightJournal).filter("},{"line_number":221,"context_line":"            models.OpenDaylightJournal.last_retried \u003c now - max_timedelta,"},{"line_number":222,"context_line":"            models.OpenDaylightJournal.state \u003d\u003d odl_const.PROCESSING).all()"},{"line_number":223,"context_line":"        for row in rows:"},{"line_number":224,"context_line":"            update_db_row_state(session, row, odl_const.PENDING)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    return len(rows)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_fb7f78dd","line":224,"range":{"start_line":223,"start_character":0,"end_line":224,"end_character":64},"in_reply_to":"7f287b81_8ac60748","updated":"2017-08-27 08:05:38.000000000","message":"\u003e update_db_row_state issues flush(). Do you want flush one-by-one within a transaction?\n\nYes, as explained in the delete.\n\n\u003e Also is it intentional that this is called under a transaction?\n\nYes, if it fails for whatever reason we don\u0027t want to leave some records changed and the others not.","commit_id":"fb9f7f6ae74688c0232964267a723ce1d9fae036"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"64400eff9ebff4807e39d84f7a726714dd1ee932","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        rows \u003d session.query(models.OpenDaylightJournal).filter("},{"line_number":221,"context_line":"            models.OpenDaylightJournal.last_retried \u003c now - max_timedelta,"},{"line_number":222,"context_line":"            models.OpenDaylightJournal.state \u003d\u003d odl_const.PROCESSING).all()"},{"line_number":223,"context_line":"        for row in rows:"},{"line_number":224,"context_line":"            update_db_row_state(session, row, odl_const.PENDING)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    return len(rows)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_9c05f113","line":224,"range":{"start_line":223,"start_character":0,"end_line":224,"end_character":64},"in_reply_to":"7f287b81_fb7f78dd","updated":"2017-08-28 20:46:27.000000000","message":"Since this is within db transaction, all change will be committed or rollbacked.","commit_id":"fb9f7f6ae74688c0232964267a723ce1d9fae036"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a47199f93a07399aafcb172b5f4b05567ff1f822","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    session.expire_all()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"@oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES)"},{"line_number":104,"context_line":"def update_db_row_state(session, row, state, flush\u003dTrue):"},{"line_number":105,"context_line":"    row.state \u003d state"},{"line_number":106,"context_line":"    session.merge(row)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f287b81_e0430341","line":103,"range":{"start_line":103,"start_character":1,"end_line":103,"end_character":58},"updated":"2017-08-29 21:50:55.000000000","message":"Now this method is called within transaction.\nSo shouldn\u0027t session activeness be checked in theory?","commit_id":"8ee3e211e4978b2a093819a8c1785e8f0fb6d073"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a635c4dfbcfd74f546e558ef419b704e3d2b0c6c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    session.expire_all()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"@oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES)"},{"line_number":104,"context_line":"def update_db_row_state(session, row, state, flush\u003dTrue):"},{"line_number":105,"context_line":"    row.state \u003d state"},{"line_number":106,"context_line":"    session.merge(row)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f287b81_8ebd69b8","line":103,"range":{"start_line":103,"start_character":1,"end_line":103,"end_character":58},"in_reply_to":"7f287b81_e0430341","updated":"2017-08-31 06:41:53.000000000","message":"Like the other one, fixed by you @ https://review.openstack.org/#/c/498966/1","commit_id":"8ee3e211e4978b2a093819a8c1785e8f0fb6d073"}],"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":"d9239703ec6cb9f321fb990a0807d2b30f31916b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                       flush\u003dnot dry_flush)"},{"line_number":87,"context_line":"            finally:"},{"line_number":88,"context_line":"                if dry_flush:"},{"line_number":89,"context_line":"                    patch_flush.stop()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            # validate the new state"},{"line_number":92,"context_line":"            row \u003d db.get_all_db_rows(self.db_session)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_352b4f31","line":89,"range":{"start_line":89,"start_character":38,"end_line":89,"end_character":38},"updated":"2017-08-31 21:30:42.000000000","message":"after stopping mock, explicity flush is desirable.","commit_id":"c2695ba2f0fad0ae07e403bfb87989c417a5ab0c"}]}
