CLOUDSTACK-7966:

remove snapshot_store_ref entry, in which role is Primary, during
storage GC
This commit is contained in:
Edison Su 2014-11-24 14:25:29 -08:00
parent 73087bc3ff
commit 4e5b3d028d

View File

@ -1176,6 +1176,10 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
}
_snapshotDao.remove(destroyedSnapshotStoreVO.getSnapshotId());
SnapshotDataStoreVO snapshotOnPrimary = _snapshotStoreDao.findBySnapshot(destroyedSnapshotStoreVO.getSnapshotId(), DataStoreRole.Primary);
if (snapshotOnPrimary != null) {
_snapshotStoreDao.remove(snapshotOnPrimary.getId());
}
_snapshotStoreDao.remove(destroyedSnapshotStoreVO.getId());
}