Skip to content

Commit 1766990

Browse files
committed
fix small issue
1 parent 68d15b4 commit 1766990

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,11 @@ protected void updateEndOfChainIfNeeded(SnapshotVO snapshotVo) {
356356
snapshotDataStoreVo = snapshotStoreDao.findBySnapshotIdAndDataStoreRoleAndState(snapshotVo.getSnapshotId(), DataStoreRole.Primary, State.Destroyed);
357357
}
358358

359+
// Snapshot is hidden, no need to update endOfChain
360+
if (snapshotDataStoreVo == null) {
361+
return;
362+
}
363+
359364
if (!snapshotDataStoreVo.isEndOfChain() || snapshotDataStoreVo.getParentSnapshotId() <= 0) {
360365
return;
361366
}

0 commit comments

Comments
 (0)