Skip to content

Commit a62fa62

Browse files
sudisonyadvr
authored andcommitted
CLOUDSTACK-7966:
remove snapshot_store_ref entry, in which role is Primary, during storage GC (cherry picked from commit 7175247) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 6d31aca commit a62fa62

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎server/src/com/cloud/storage/StorageManagerImpl.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,10 @@ public void cleanupSecondaryStorage(boolean recurring) {
11521152
}
11531153

11541154
_snapshotDao.remove(destroyedSnapshotStoreVO.getSnapshotId());
1155+
SnapshotDataStoreVO snapshotOnPrimary = _snapshotStoreDao.findBySnapshot(destroyedSnapshotStoreVO.getSnapshotId(), DataStoreRole.Primary);
1156+
if (snapshotOnPrimary != null) {
1157+
_snapshotStoreDao.remove(snapshotOnPrimary.getId());
1158+
}
11551159
_snapshotStoreDao.remove(destroyedSnapshotStoreVO.getId());
11561160
}
11571161

0 commit comments

Comments
 (0)