vishesh92 commented on code in PR #8362: URL: https://github.com/apache/cloudstack/pull/8362#discussion_r1489245402
########## server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java: ########## @@ -1732,8 +1736,8 @@ public Volume destroyVolume(long volumeId, Account caller, boolean expunge, bool logger.debug("Failed to destroy volume" + volume.getId(), e); return null; } - _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.volume, volume.isDisplay()); - _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, volume.isDisplay(), new Long(volume.getSize())); + _resourceLimitMgr.decrementVolumeResourceCount(volume.getAccountId(), volume.isDisplay(), + volume.getSize(), _diskOfferingDao.findById(volume.getDiskOfferingId())); Review Comment: We should use `findByIdIncludingRemoved` here. -- 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