shwstppr commented on a change in pull request #5017:
URL: https://github.com/apache/cloudstack/pull/5017#discussion_r635073386



##########
File path: engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java
##########
@@ -613,7 +613,7 @@ boolean ifStateUnchanged(State oldState, State newState, 
Long oldHostId, Long ne
         if (backupOfferingId != null) {
             sc.setParameters("backup_offering_id", backupOfferingId);
         }
-        return listBy(sc);
+        return listIncludingRemovedBy(sc);

Review comment:
       @Pearl1594 `listByZoneWithBackups` is also used by `BackupSyncTask`. Can 
there be a case of usage event being published for a deleted VM or is it fine 
to publish events with type`EVENT_VM_BACKUP_USAGE_METRIC` for deleted VMs?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to