This is an automated email from the ASF dual-hosted git repository.

bstoyanov pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 36edd92e480 Fix snapshot physical size after migration (#12166)
36edd92e480 is described below

commit 36edd92e480d8b738335c6500b2e90c4d3f91fb9
Author: Henrique Sato <[email protected]>
AuthorDate: Mon Jan 26 07:58:42 2026 -0300

    Fix snapshot physical size after migration (#12166)
---
 .../apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java
 
b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java
index 641a2a40dcd..f739fecf9bf 100644
--- 
a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java
+++ 
b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java
@@ -280,7 +280,7 @@ public class SecondaryStorageServiceImpl implements 
SecondaryStorageService {
     private void updateDataObject(DataObject srcData, DataObject destData) {
         if (destData instanceof SnapshotInfo) {
             SnapshotDataStoreVO snapshotStore = 
snapshotStoreDao.findBySourceSnapshot(srcData.getId(), DataStoreRole.Image);
-            SnapshotDataStoreVO destSnapshotStore = 
snapshotStoreDao.findByStoreSnapshot(DataStoreRole.Image, 
srcData.getDataStore().getId(), srcData.getId());
+            SnapshotDataStoreVO destSnapshotStore = 
snapshotStoreDao.findByStoreSnapshot(DataStoreRole.Image, 
destData.getDataStore().getId(), destData.getId());
             if (snapshotStore != null && destSnapshotStore != null) {
                 
destSnapshotStore.setPhysicalSize(snapshotStore.getPhysicalSize());
                 destSnapshotStore.setCreated(snapshotStore.getCreated());

Reply via email to