mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7966:
remove snapshot_store_ref entry, in which role is Primary, during
storage GC
(cherry picked from commit 7175247c5e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
404a5e757c
commit
3006f5cc83
|
|
@ -1150,6 +1150,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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue