Skip to content

Commit e81766a

Browse files
committed
Fix snapshot physical size after migration
1 parent db61470 commit e81766a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ protected Void migrateDataCallBack(AsyncCallbackDispatcher<SecondaryStorageServi
280280
private void updateDataObject(DataObject srcData, DataObject destData) {
281281
if (destData instanceof SnapshotInfo) {
282282
SnapshotDataStoreVO snapshotStore = snapshotStoreDao.findBySourceSnapshot(srcData.getId(), DataStoreRole.Image);
283-
SnapshotDataStoreVO destSnapshotStore = snapshotStoreDao.findByStoreSnapshot(DataStoreRole.Image, srcData.getDataStore().getId(), srcData.getId());
283+
SnapshotDataStoreVO destSnapshotStore = snapshotStoreDao.findByStoreSnapshot(DataStoreRole.Image, destData.getDataStore().getId(), destData.getId());
284284
if (snapshotStore != null && destSnapshotStore != null) {
285285
destSnapshotStore.setPhysicalSize(snapshotStore.getPhysicalSize());
286286
destSnapshotStore.setCreated(snapshotStore.getCreated());

0 commit comments

Comments
 (0)