)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"88b520c9300c0857c44852baae232a71a70f59a8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the information of the quota_usages table will not be updated."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I040ccde7f04ae39258afd9b7322c939c8d796bde"},{"line_number":17,"context_line":"Closes-bug: #1802430"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_e5ac4f88","line":17,"updated":"2018-11-09 09:45:00.000000000","message":"This bug is due to we do db.volume_type_update successfully, but fail to do QUOTAS.update_quota_resource.\n\nand the related bug is [1], better to mention it.\n\n[1] https://bugs.launchpad.net/cinder/+bug/1608849","commit_id":"98522c368912745641a1c4868b53770f7248899f"},{"author":{"_account_id":24454,"name":"suguangfeng","email":"suguangfeng@inspur.com","username":"suguangfeng"},"change_message_id":"5973a9c6dd837c895285a819419d38f7cb6b0ff1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the information of the quota_usages table will not be updated."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I040ccde7f04ae39258afd9b7322c939c8d796bde"},{"line_number":17,"context_line":"Closes-bug: #1802430"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_e5676f22","line":17,"in_reply_to":"3f79a3b5_e5ac4f88","updated":"2018-11-09 10:01:05.000000000","message":"Done","commit_id":"98522c368912745641a1c4868b53770f7248899f"}],"cinder/tests/unit/test_volume_types.py":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"88b520c9300c0857c44852baae232a71a70f59a8","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                                  self.vol_type1_name,"},{"line_number":125,"context_line":"                                                  new_type_name)"},{"line_number":126,"context_line":"        volume_types.destroy(self.ctxt, type_ref.id)"},{"line_number":127,"context_line":"   "},{"line_number":128,"context_line":"    @mock.patch(\u0027cinder.quota.VolumeTypeQuotaEngine.\u0027"},{"line_number":129,"context_line":"                \u0027update_quota_resource\u0027)"},{"line_number":130,"context_line":"    def test_update_volume_type_name_with_db_error(self, mock_update_quota):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6584bf57","line":127,"updated":"2018-11-09 09:45:00.000000000","message":"redundant space","commit_id":"98522c368912745641a1c4868b53770f7248899f"},{"author":{"_account_id":24454,"name":"suguangfeng","email":"suguangfeng@inspur.com","username":"suguangfeng"},"change_message_id":"5973a9c6dd837c895285a819419d38f7cb6b0ff1","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                                  self.vol_type1_name,"},{"line_number":125,"context_line":"                                                  new_type_name)"},{"line_number":126,"context_line":"        volume_types.destroy(self.ctxt, type_ref.id)"},{"line_number":127,"context_line":"   "},{"line_number":128,"context_line":"    @mock.patch(\u0027cinder.quota.VolumeTypeQuotaEngine.\u0027"},{"line_number":129,"context_line":"                \u0027update_quota_resource\u0027)"},{"line_number":130,"context_line":"    def test_update_volume_type_name_with_db_error(self, mock_update_quota):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_e5b20f95","line":127,"in_reply_to":"3f79a3b5_6584bf57","updated":"2018-11-09 10:01:05.000000000","message":"Done","commit_id":"98522c368912745641a1c4868b53770f7248899f"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"88b520c9300c0857c44852baae232a71a70f59a8","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                                   self.vol_type1_name)"},{"line_number":147,"context_line":"        self.assertEqual(self.vol_type1_name, new.get(\u0027name\u0027))"},{"line_number":148,"context_line":"        self.assertEqual(self.vol_type1_description, new.get(\u0027description\u0027))"},{"line_number":149,"context_line":"        self.assertEqual(True,new.get(\u0027is_public\u0027))"},{"line_number":150,"context_line":"        volume_types.destroy(self.ctxt, type_ref.id)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def test_volume_type_create_then_destroy_with_non_admin(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_25bb27e4","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":51},"updated":"2018-11-09 09:45:00.000000000","message":"self.assertTrue()","commit_id":"98522c368912745641a1c4868b53770f7248899f"},{"author":{"_account_id":24454,"name":"suguangfeng","email":"suguangfeng@inspur.com","username":"suguangfeng"},"change_message_id":"5973a9c6dd837c895285a819419d38f7cb6b0ff1","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                                   self.vol_type1_name)"},{"line_number":147,"context_line":"        self.assertEqual(self.vol_type1_name, new.get(\u0027name\u0027))"},{"line_number":148,"context_line":"        self.assertEqual(self.vol_type1_description, new.get(\u0027description\u0027))"},{"line_number":149,"context_line":"        self.assertEqual(True,new.get(\u0027is_public\u0027))"},{"line_number":150,"context_line":"        volume_types.destroy(self.ctxt, type_ref.id)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def test_volume_type_create_then_destroy_with_non_admin(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a5a89720","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":51},"in_reply_to":"3f79a3b5_25bb27e4","updated":"2018-11-09 10:01:05.000000000","message":"Done","commit_id":"98522c368912745641a1c4868b53770f7248899f"}],"cinder/volume/volume_types.py":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"88b520c9300c0857c44852baae232a71a70f59a8","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                                          dict(name\u003dold_type_name,"},{"line_number":92,"context_line":"                                               description\u003dold_description,"},{"line_number":93,"context_line":"                                               is_public\u003dold_public))"},{"line_number":94,"context_line":"                    raise"},{"line_number":95,"context_line":"    except db_exc.DBError:"},{"line_number":96,"context_line":"        LOG.exception(\u0027DB error:\u0027)"},{"line_number":97,"context_line":"        raise exception.VolumeTypeUpdateFailed(id\u003did)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_05cf0b8b","line":94,"range":{"start_line":94,"start_character":20,"end_line":94,"end_character":25},"updated":"2018-11-09 09:45:00.000000000","message":"maybe it\u0027s better as below:\n\nwith excutils.save_and_reraise_exception():\n    db.volume_type_update(...)","commit_id":"98522c368912745641a1c4868b53770f7248899f"},{"author":{"_account_id":24454,"name":"suguangfeng","email":"suguangfeng@inspur.com","username":"suguangfeng"},"change_message_id":"5973a9c6dd837c895285a819419d38f7cb6b0ff1","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                                          dict(name\u003dold_type_name,"},{"line_number":92,"context_line":"                                               description\u003dold_description,"},{"line_number":93,"context_line":"                                               is_public\u003dold_public))"},{"line_number":94,"context_line":"                    raise"},{"line_number":95,"context_line":"    except db_exc.DBError:"},{"line_number":96,"context_line":"        LOG.exception(\u0027DB error:\u0027)"},{"line_number":97,"context_line":"        raise exception.VolumeTypeUpdateFailed(id\u003did)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_25624716","line":94,"range":{"start_line":94,"start_character":20,"end_line":94,"end_character":25},"in_reply_to":"3f79a3b5_05cf0b8b","updated":"2018-11-09 10:01:05.000000000","message":"I think it\u0027s OK for now.","commit_id":"98522c368912745641a1c4868b53770f7248899f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c83c2d72648f88b80d066c5120461aa247413a46","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                                 old_type_name,"},{"line_number":87,"context_line":"                                                 name)"},{"line_number":88,"context_line":"                # Rollback the updated information to the original"},{"line_number":89,"context_line":"                except db_exc.DBError:"},{"line_number":90,"context_line":"                    db.volume_type_update(elevated, id,"},{"line_number":91,"context_line":"                                          dict(name\u003dold_type_name,"},{"line_number":92,"context_line":"                                               description\u003dold_description,"},{"line_number":93,"context_line":"                                               is_public\u003dold_public))"},{"line_number":94,"context_line":"                    raise"},{"line_number":95,"context_line":"    except db_exc.DBError:"},{"line_number":96,"context_line":"        LOG.exception(\u0027DB error:\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_db51f20d","line":93,"range":{"start_line":89,"start_character":16,"end_line":93,"end_character":69},"updated":"2018-11-09 11:12:26.000000000","message":"+1 for this. I think this catch is necessary, in the cinder project, I encountered a lot of quota inconsistencies. The root cause is the lack of such a rollback mechanism.","commit_id":"9de1762077d47fcb3b7b8910a39b3070f83ac8e7"}]}
