)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"cc00319cf5a9ce9614c307f00d627b1d2dc1219c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-11 12:05:50 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change journal entry selection to optimistic locking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Journal entry selection with SELECT FOR UPDATE can cause deadlocks if"},{"line_number":10,"context_line":"calculating dependencies, it was changed to optimistic locking to avoid this."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f1d235d_69dcf845","line":7,"updated":"2017-07-11 14:03:33.000000000","message":"does this make sense with repeatable read?","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"d908b8f081403f85aa83a89631b6a95abe8ea09d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-11 12:05:50 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change journal entry selection to optimistic locking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Journal entry selection with SELECT FOR UPDATE can cause deadlocks if"},{"line_number":10,"context_line":"calculating dependencies, it was changed to optimistic locking to avoid this."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1f1a1f67_792adfe7","line":7,"in_reply_to":"1f1a1f67_562ff2f5","updated":"2017-07-12 09:04:26.000000000","message":"Yes since lock grab happens in a separate transaction and afterwards its commited, after that only the winning thread is acting on the row so it doesn\u0027t matter what isolation level is used since no other thread will touch it as it\u0027s state has changed from PENDING.","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"ea8c8d07630589fde59b59e5a3388fbc8cb924e2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-11 12:05:50 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change journal entry selection to optimistic locking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Journal entry selection with SELECT FOR UPDATE can cause deadlocks if"},{"line_number":10,"context_line":"calculating dependencies, it was changed to optimistic locking to avoid this."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"df3967d1_bc183181","line":7,"in_reply_to":"1f1a1f67_792adfe7","updated":"2017-07-31 10:56:50.000000000","message":"i\u0027m not sure if i understood.\nthis commit is trying to detect staleness in a single transaction (get_oldest_pending_db_row_with_lock) right?\n\n\"Concurrent transaction updates\" in [1] seems suggesting it doesn\u0027t work with repeatable read.\n\n[1] http://docs.sqlalchemy.org/en/latest/orm/versioning.html#mapper-version-counter","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e711d742a54c2520e8fd052d28bf5f79585837b3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-11 12:05:50 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change journal entry selection to optimistic locking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Journal entry selection with SELECT FOR UPDATE can cause deadlocks if"},{"line_number":10,"context_line":"calculating dependencies, it was changed to optimistic locking to avoid this."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1f1a1f67_562ff2f5","line":7,"in_reply_to":"1f1a1f67_f6203e4c","updated":"2017-07-12 08:38:06.000000000","message":"it\u0027s about using \"update ... where ...\u003ccheck the old version here\u003e...\" to update a row atomically, right?\ndoes it work with repeatable read, with which queries will always see the same version during a transaction?","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"35b4a3a6293ccfdedb8a3f18c387030a60e00922","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-11 12:05:50 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change journal entry selection to optimistic locking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Journal entry selection with SELECT FOR UPDATE can cause deadlocks if"},{"line_number":10,"context_line":"calculating dependencies, it was changed to optimistic locking to avoid this."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1f1a1f67_f6203e4c","line":7,"in_reply_to":"3f1d235d_69dcf845","updated":"2017-07-12 08:29:55.000000000","message":"What\u0027s the concern with repeatable read?","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"9172eeda9f36e1a9403305fcb057de6f505c72a5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Kolesnik \u003cmkolesni@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-11 12:05:50 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change journal entry selection to optimistic locking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Journal entry selection with SELECT FOR UPDATE can cause deadlocks if"},{"line_number":10,"context_line":"calculating dependencies, it was changed to optimistic locking to avoid this."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"df3967d1_879f564f","line":7,"in_reply_to":"df3967d1_bc183181","updated":"2017-07-31 11:07:39.000000000","message":"A few lines further:\n\"though it still can be used for cross-transaction staleness detection\"\n\nThis is the case we\u0027re looking at..","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"}],"networking_odl/db/db.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"5e319eeba918f04c02f80110fd1581329c91aa73","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        row \u003d session.query(models.OpenDaylightJournal).filter_by("},{"line_number":96,"context_line":"            state\u003dodl_const.PENDING).order_by("},{"line_number":97,"context_line":"            asc(models.OpenDaylightJournal.last_retried)).first()"},{"line_number":98,"context_line":"        if row:"},{"line_number":99,"context_line":"            update_db_row_state(session, row, odl_const.PROCESSING)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    return row"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_9edaf714","line":99,"range":{"start_line":98,"start_character":0,"end_line":99,"end_character":67},"updated":"2017-07-31 17:17:57.000000000","message":"Yamamoto is claiming that this update should be after committing the transaction of line 94.","commit_id":"cc46910f58be0c63fd8b74f25a3c0a625ee7b816"}]}
