vishesh92 commented on code in PR #8362: URL: https://github.com/apache/cloudstack/pull/8362#discussion_r1489240730
########## server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java: ########## @@ -1038,8 +1041,8 @@ public VolumeVO createVolume(CreateVolumeCmd cmd) { } finally { if (!created) { logger.trace("Decrementing volume resource count for account id=" + volume.getAccountId() + " as volume failed to create on the backend"); - _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.volume, cmd.getDisplayVolume()); - _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, cmd.getDisplayVolume(), new Long(volume.getSize())); + _resourceLimitMgr.decrementVolumeResourceCount(volume.getAccountId(), cmd.getDisplayVolume(), + volume.getSize(), _diskOfferingDao.findById(volume.getDiskOfferingId())); Review Comment: Should we use `findByIdIncludingRemoved` instead? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org