)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b5ec79c0670bb6e4ac4407839f7c5585ed0f13a4","unresolved":true,"context_lines":[{"line_number":16,"context_line":"the quota driver clean up mechanisms."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch also adds a timeout delay for expired reservations in"},{"line_number":19,"context_line":"``DbQuotaNoLockDriver``. Now this driver deletes any existing"},{"line_number":20,"context_line":"reservation created ``RESERVATION_EXPIRATION_TIMEOUT \u003d 20`` (seconds)"},{"line_number":21,"context_line":"before. It is assumed that any reservation should be released before"},{"line_number":22,"context_line":"this time (regardless if the resource is created or not)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ae282858_946fa813","line":19,"range":{"start_line":19,"start_character":2,"end_line":19,"end_character":21},"updated":"2021-08-19 07:15:45.000000000","message":"why not do the same for DbQuotaDriver?","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a0e00ca7923957ad0b48b43c7171f6b5e3121d85","unresolved":true,"context_lines":[{"line_number":16,"context_line":"the quota driver clean up mechanisms."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch also adds a timeout delay for expired reservations in"},{"line_number":19,"context_line":"``DbQuotaNoLockDriver``. Now this driver deletes any existing"},{"line_number":20,"context_line":"reservation created ``RESERVATION_EXPIRATION_TIMEOUT \u003d 20`` (seconds)"},{"line_number":21,"context_line":"before. It is assumed that any reservation should be released before"},{"line_number":22,"context_line":"this time (regardless if the resource is created or not)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"edf3a2ef_2456b393","line":19,"range":{"start_line":19,"start_character":2,"end_line":19,"end_character":21},"in_reply_to":"ae282858_946fa813","updated":"2021-08-19 07:46:09.000000000","message":"Because this driver handles the expiration reservations in a different way. \"DbQuotaNoLockDriver\" is simple (that was my intention when I implemented it): when we receive a request, we search for expired resources and delete them, that easy. This patch is adding this timeout not to delete any existing reservation when creating a new resource.","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1abe6b7a5a3544272fdba03331062e8b80ce9f85","unresolved":false,"context_lines":[{"line_number":16,"context_line":"the quota driver clean up mechanisms."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch also adds a timeout delay for expired reservations in"},{"line_number":19,"context_line":"``DbQuotaNoLockDriver``. Now this driver deletes any existing"},{"line_number":20,"context_line":"reservation created ``RESERVATION_EXPIRATION_TIMEOUT \u003d 20`` (seconds)"},{"line_number":21,"context_line":"before. It is assumed that any reservation should be released before"},{"line_number":22,"context_line":"this time (regardless if the resource is created or not)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"0d131145_f8979d89","line":19,"range":{"start_line":19,"start_character":2,"end_line":19,"end_character":21},"in_reply_to":"edf3a2ef_2456b393","updated":"2021-08-19 07:58:29.000000000","message":"Understood, thanks","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"}],"neutron/db/quota/api.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b5ec79c0670bb6e4ac4407839f7c5585ed0f13a4","unresolved":true,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ddb624c0_cc766bca","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"updated":"2021-08-19 07:15:45.000000000","message":"nit: while here, can rename to project_id","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"787bd743fbaf60c91f9fea4a610ee2d21d233786","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c96954d0_d3d87a37","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"in_reply_to":"03eb340f_d51d02e5","updated":"2021-08-24 12:59:50.000000000","message":"I\u0027ll do it in a follow-up patch and I\u0027ll change all references to tenant_id in this file.","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1fc4cfa4b19b4614c6feed73e38866ed67be8529","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"03eb340f_d51d02e5","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"in_reply_to":"7803fcff_996a1314","updated":"2021-08-24 09:18:11.000000000","message":"I didn\u0027t know that (I wasn\u0027t active in Neutron at the time when this process was started really). But if You say so, I\u0027 fine with changing it here in that patch.","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9f505c61434447a8d9f5dc9d200c2810fb6da7d7","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4fdd9152_da28c0d8","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"in_reply_to":"afeec911_da100297","updated":"2021-08-25 11:42:17.000000000","message":"thx","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1abe6b7a5a3544272fdba03331062e8b80ce9f85","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7803fcff_996a1314","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"in_reply_to":"b8d63632_d3f00399","updated":"2021-08-19 07:58:29.000000000","message":"IIRC the agreement that time was to not try rename tenant to project everywhere with dedicated patches, but to rename gradually while touching the code around \u0027tenants\u0027. But I could be wrong. Anyway just a nit","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8d77b2ec2ab9bb69509f6064318b790f90b71e48","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"afeec911_da100297","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"in_reply_to":"c96954d0_d3d87a37","updated":"2021-08-24 13:25:43.000000000","message":"--\u003e https://review.opendev.org/c/openstack/neutron/+/805849","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a0e00ca7923957ad0b48b43c7171f6b5e3121d85","unresolved":true,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":243,"context_line":"@db_api.CONTEXT_WRITER"},{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"b8d63632_d3f00399","line":244,"range":{"start_line":244,"start_character":41,"end_line":244,"end_character":50},"in_reply_to":"ddb624c0_cc766bca","updated":"2021-08-19 07:46:09.000000000","message":"Yes, that\u0027s a tech debt we need to close but not in this patch.","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1fc4cfa4b19b4614c6feed73e38866ed67be8529","unresolved":true,"context_lines":[{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"},{"line_number":248,"context_line":"    return quota_obj.Reservation.delete_expired(context, now, tenant_id)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"4584ce13_4fdf262a","line":247,"range":{"start_line":247,"start_character":8,"end_line":247,"end_character":11},"updated":"2021-08-24 09:18:11.000000000","message":"stricktly speaking it\u0027s not \"now\" anymore :)","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"10cf5590005d6da4730ec8e85a1e61d8341b422a","unresolved":true,"context_lines":[{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"},{"line_number":248,"context_line":"    return quota_obj.Reservation.delete_expired(context, now, tenant_id)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"b9b45463_c44c5336","line":247,"range":{"start_line":247,"start_character":8,"end_line":247,"end_character":11},"in_reply_to":"4584ce13_4fdf262a","updated":"2021-08-24 12:59:05.000000000","message":"hehehe I\u0027ll change it","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9f505c61434447a8d9f5dc9d200c2810fb6da7d7","unresolved":false,"context_lines":[{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"},{"line_number":248,"context_line":"    return quota_obj.Reservation.delete_expired(context, now, tenant_id)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"4cc27c7b_ace5d79e","line":247,"range":{"start_line":247,"start_character":8,"end_line":247,"end_character":11},"in_reply_to":"7a2e709c_14e96eb6","updated":"2021-08-25 11:42:17.000000000","message":"thx :)","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"fa2f2ff94579f507c4ae16b15ce4f2a69d904cf5","unresolved":false,"context_lines":[{"line_number":244,"context_line":"def remove_expired_reservations(context, tenant_id\u003dNone, timeout\u003dNone):"},{"line_number":245,"context_line":"    now \u003d utcnow()"},{"line_number":246,"context_line":"    if timeout:"},{"line_number":247,"context_line":"        now -\u003d datetime.timedelta(seconds\u003dtimeout)"},{"line_number":248,"context_line":"    return quota_obj.Reservation.delete_expired(context, now, tenant_id)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2e709c_14e96eb6","line":247,"range":{"start_line":247,"start_character":8,"end_line":247,"end_character":11},"in_reply_to":"b9b45463_c44c5336","updated":"2021-08-24 13:00:01.000000000","message":"Done","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"}],"neutron/db/quota/driver_nolock.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b5ec79c0670bb6e4ac4407839f7c5585ed0f13a4","unresolved":true,"context_lines":[{"line_number":53,"context_line":"            # Delete expired reservations before counting valid ones. This"},{"line_number":54,"context_line":"            # operation is fast and by calling it before making any"},{"line_number":55,"context_line":"            # reservation, we ensure the freshness of the reservations."},{"line_number":56,"context_line":"            quota_api.remove_expired_reservations("},{"line_number":57,"context_line":"                context, tenant_id\u003dproject_id,"},{"line_number":58,"context_line":"                timeout\u003dquota_api.RESERVATION_EXPIRATION_TIMEOUT)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"163b7a8e_9b629ecd","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":49},"updated":"2021-08-19 07:15:45.000000000","message":"So this one is called out of resource creation scope, and DB error/retry here won\u0027t lead to the bug, right?","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a0e00ca7923957ad0b48b43c7171f6b5e3121d85","unresolved":true,"context_lines":[{"line_number":53,"context_line":"            # Delete expired reservations before counting valid ones. This"},{"line_number":54,"context_line":"            # operation is fast and by calling it before making any"},{"line_number":55,"context_line":"            # reservation, we ensure the freshness of the reservations."},{"line_number":56,"context_line":"            quota_api.remove_expired_reservations("},{"line_number":57,"context_line":"                context, tenant_id\u003dproject_id,"},{"line_number":58,"context_line":"                timeout\u003dquota_api.RESERVATION_EXPIRATION_TIMEOUT)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"6327ba5e_b03f8f01","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":49},"in_reply_to":"163b7a8e_9b629ecd","updated":"2021-08-19 07:46:09.000000000","message":"No, at this point we can fail. If the reservation removal fails, we retry the whole operation. This is called at the beginning of the API call.\n\nWhat we don\u0027t want to retry is the \"remove_reservation\" call (called in L78 \"cancel_reservation\"). This is called at the end of the API call, when the resource has been created (or not) and we don\u0027t want, at this point, to retry anything.","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1abe6b7a5a3544272fdba03331062e8b80ce9f85","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            # Delete expired reservations before counting valid ones. This"},{"line_number":54,"context_line":"            # operation is fast and by calling it before making any"},{"line_number":55,"context_line":"            # reservation, we ensure the freshness of the reservations."},{"line_number":56,"context_line":"            quota_api.remove_expired_reservations("},{"line_number":57,"context_line":"                context, tenant_id\u003dproject_id,"},{"line_number":58,"context_line":"                timeout\u003dquota_api.RESERVATION_EXPIRATION_TIMEOUT)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe5df21_49511faa","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":49},"in_reply_to":"6327ba5e_b03f8f01","updated":"2021-08-19 07:58:29.000000000","message":"Ack","commit_id":"76289382d9cf24ae76f4541d89680c6d8d4c7911"}]}
