sureshanaparti commented on code in PR #11448:
URL: https://github.com/apache/cloudstack/pull/11448#discussion_r2279041258


##########
engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java:
##########
@@ -172,10 +172,15 @@ public boolean isRevertable() {
     @Override
     public long getPhysicalSize() {
         long physicalSize = 0;
-        SnapshotDataStoreVO snapshotStore = 
snapshotStoreDao.findByStoreSnapshot(DataStoreRole.Image, store.getId(), 
snapshot.getId());
-        if (snapshotStore != null) {
-            physicalSize = snapshotStore.getPhysicalSize();
+        for (DataStoreRole role : List.of(DataStoreRole.Image, 
DataStoreRole.Primary)) {
+            logger.trace("Retrieving snapshot [{}] size from {} storage.", 
snapshot.getUuid(), role);
+            SnapshotDataStoreVO snapshotStore = 
snapshotStoreDao.findByStoreSnapshot(role, store.getId(), snapshot.getId());

Review Comment:
   got it, thanks @JoaoJandre 



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