You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/11/28 19:03:22 UTC
[08/51] [abbrv] git commit: updated
refs/heads/useraccount-refactoring to 1e25886
CLOUDSTACK-7966:
remove snapshot_store_ref entry, in which role is Primary, during
storage GC
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4e5b3d02
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4e5b3d02
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4e5b3d02
Branch: refs/heads/useraccount-refactoring
Commit: 4e5b3d028dc990f27484b79db67926c4371715ac
Parents: 73087bc
Author: Edison Su <su...@gmail.com>
Authored: Mon Nov 24 14:25:29 2014 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Mon Nov 24 14:27:56 2014 -0800
----------------------------------------------------------------------
server/src/com/cloud/storage/StorageManagerImpl.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5b3d02/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 1184320..e78a015 100644
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -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());
}