)]}'
{"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"0c8ec7b9bc7ce6e8b6c1dcb11ffc96fcb3396319","unresolved":true,"context_lines":[{"line_number":1239,"context_line":"                res_until \u003d usages[resource].until_refresh"},{"line_number":1240,"context_line":"                if ((res_until is None and until_refresh) or"},{"line_number":1241,"context_line":"                        ((res_until or 0) \u003e (until_refresh or 0))):"},{"line_number":1242,"context_line":"                    usages[resource].until_refresh \u003d until_refresh or None"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"        # Check for deltas that would go negative"},{"line_number":1245,"context_line":"        if is_allocated_reserve:"}],"source_content_type":"text/x-python","patch_set":6,"id":"a8bdff0f_a20a0233","line":1242,"range":{"start_line":1242,"start_character":20,"end_line":1242,"end_character":74},"updated":"2021-03-30 18:52:30.000000000","message":"One question, while creating a resource we subtract 1 from the old reservation and after that we\u0027re setting the new value here set in conf which doesn\u0027t account for the current resource creation, is this intended?\nSuppose we initially set until_refresh value to 5, create volume (now value is 4) stop c-api service set it to 2, start c-api service, create a volume (here res_until is 3 then we set it to 2. should it be set to 2 or (until_refresh - 1) i.e. 1 ?","commit_id":"85aee67dc7a3754e3e8b794cc2bf13dc203d9398"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"252f22b2047835893010c56438f7f99c2b7b699b","unresolved":true,"context_lines":[{"line_number":1239,"context_line":"                res_until \u003d usages[resource].until_refresh"},{"line_number":1240,"context_line":"                if ((res_until is None and until_refresh) or"},{"line_number":1241,"context_line":"                        ((res_until or 0) \u003e (until_refresh or 0))):"},{"line_number":1242,"context_line":"                    usages[resource].until_refresh \u003d until_refresh or None"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"        # Check for deltas that would go negative"},{"line_number":1245,"context_line":"        if is_allocated_reserve:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffa5d64e_356645b1","line":1242,"range":{"start_line":1242,"start_character":20,"end_line":1242,"end_character":74},"in_reply_to":"a8bdff0f_a20a0233","updated":"2021-03-31 14:34:12.000000000","message":"It doesn\u0027t really matter, but it should be set to 1, since in that case the resource until refresh is lower than the current value, which is the case we don\u0027t care about (we only care about the 3 cases mentioned in the comment).\n\nThe reason is that we want to have an until_refresh value in the resource that is consistent with the current configured value.\n\nSo we don\u0027t want those 3 cases:\n\n- Resource value is disabled but config is enabled\n- Resource value is enabled but config is disabled\n- Resource has a greater value than the configured one","commit_id":"85aee67dc7a3754e3e8b794cc2bf13dc203d9398"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"63f087a009dcbd69cac28de86be3a9312cafc3d9","unresolved":true,"context_lines":[{"line_number":1239,"context_line":"                res_until \u003d usages[resource].until_refresh"},{"line_number":1240,"context_line":"                if ((res_until is None and until_refresh) or"},{"line_number":1241,"context_line":"                        ((res_until or 0) \u003e (until_refresh or 0))):"},{"line_number":1242,"context_line":"                    usages[resource].until_refresh \u003d until_refresh or None"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"        # Check for deltas that would go negative"},{"line_number":1245,"context_line":"        if is_allocated_reserve:"}],"source_content_type":"text/x-python","patch_set":6,"id":"82db142d_888d55c5","line":1242,"range":{"start_line":1242,"start_character":20,"end_line":1242,"end_character":74},"in_reply_to":"ffa5d64e_356645b1","updated":"2021-03-31 14:49:45.000000000","message":"Thanks for the explanation. The code handles the mentioned cases.","commit_id":"85aee67dc7a3754e3e8b794cc2bf13dc203d9398"}],"cinder/tests/unit/test_quota.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d74e918bcecb7169bf7e74ee3bc04131f910842a","unresolved":true,"context_lines":[{"line_number":1720,"context_line":"    def test_quota_reserve_until_refresh_disabled(self):"},{"line_number":1721,"context_line":"        # Simulate service running with until_refresh disabled"},{"line_number":1722,"context_line":"        self.init_usage(\u0027test_project\u0027, \u0027volumes\u0027, 3, 0, until_refresh\u003d5)"},{"line_number":1723,"context_line":"        self.init_usage(\u0027test_project\u0027, \u0027gigabytes\u0027, 100, 0, until_refresh\u003d5)"},{"line_number":1724,"context_line":"        context \u003d FakeContext(\u0027test_project\u0027, \u0027test_class\u0027)"},{"line_number":1725,"context_line":"        quotas \u003d dict(volumes\u003d5, gigabytes\u003d10 * 1024, )"},{"line_number":1726,"context_line":"        deltas \u003d dict(volumes\u003d2, gigabytes\u003d2 * 1024, )"}],"source_content_type":"text/x-python","patch_set":3,"id":"8238aa41_c5b5fd2a","line":1723,"updated":"2021-03-19 02:54:33.000000000","message":"You changed the values from the previous test but forgot to update the comments at lines 1721 and 1729.","commit_id":"6283737bef39ed2d9f661939a588b150df3a153e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2428ad5db39f08d9ed36b955d9848426ca3600a5","unresolved":false,"context_lines":[{"line_number":1720,"context_line":"    def test_quota_reserve_until_refresh_disabled(self):"},{"line_number":1721,"context_line":"        # Simulate service running with until_refresh disabled"},{"line_number":1722,"context_line":"        self.init_usage(\u0027test_project\u0027, \u0027volumes\u0027, 3, 0, until_refresh\u003d5)"},{"line_number":1723,"context_line":"        self.init_usage(\u0027test_project\u0027, \u0027gigabytes\u0027, 100, 0, until_refresh\u003d5)"},{"line_number":1724,"context_line":"        context \u003d FakeContext(\u0027test_project\u0027, \u0027test_class\u0027)"},{"line_number":1725,"context_line":"        quotas \u003d dict(volumes\u003d5, gigabytes\u003d10 * 1024, )"},{"line_number":1726,"context_line":"        deltas \u003d dict(volumes\u003d2, gigabytes\u003d2 * 1024, )"}],"source_content_type":"text/x-python","patch_set":3,"id":"cc4d076e_91df5900","line":1723,"in_reply_to":"8238aa41_c5b5fd2a","updated":"2021-03-26 11:28:29.000000000","message":"Done","commit_id":"6283737bef39ed2d9f661939a588b150df3a153e"}]}
