vishesh92 commented on code in PR #8362:
URL: https://github.com/apache/cloudstack/pull/8362#discussion_r1489252719


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -8402,8 +8452,7 @@ private void 
postProcessingUnmanageVMVolumes(List<VolumeVO> volumes, UserVmVO vm
                 
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_DELETE, 
volume.getAccountId(), volume.getDataCenterId(), volume.getId(), 
volume.getName(),
                         Volume.class.getName(), volume.getUuid(), 
volume.isDisplayVolume());
             }
-            _resourceLimitMgr.decrementResourceCount(vm.getAccountId(), 
ResourceType.volume);
-            _resourceLimitMgr.decrementResourceCount(vm.getAccountId(), 
ResourceType.primary_storage, new Long(volume.getSize()));
+            _resourceLimitMgr.decrementVolumeResourceCount(vm.getAccountId(), 
volume.isDisplayVolume(), volume.getSize(), 
_diskOfferingDao.findById(volume.getDiskOfferingId()));

Review Comment:
   findById or findByIdIncludingRemoved?



-- 
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

Reply via email to