cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [2/4] git commit: updated refs/heads/4.3 to 1f21c29
Date Tue, 25 Nov 2014 11:43:46 GMT
CLOUDSTACK-7966:
remove snapshot_store_ref entry, in which role is Primary, during
storage GC

(cherry picked from commit 7175247c5e10eb6c152b2629e5496337e3287afd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a62fa62f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a62fa62f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a62fa62f

Branch: refs/heads/4.3
Commit: a62fa62fc6d03082a350fee404d0fa7b61d8b4d1
Parents: 6d31aca
Author: Edison Su <sudison@gmail.com>
Authored: Mon Nov 24 14:25:29 2014 -0800
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Nov 25 14:14:31 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/StorageManagerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a62fa62f/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 49132e4..385b478 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -1152,6 +1152,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());
                     }
 


Mime
View raw message