cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [11/41] git commit: updated refs/heads/4.4 to 010a217
Date Thu, 11 Dec 2014 16:53:51 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/3006f5cc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3006f5cc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3006f5cc

Branch: refs/heads/4.4
Commit: 3006f5cc83f0ecd88cb51b30efeb839121ccbae9
Parents: 404a5e7
Author: Edison Su <sudison@gmail.com>
Authored: Mon Nov 24 14:25:29 2014 -0800
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Dec 11 20:28:15 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/3006f5cc/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 1cdf54e..fafd002 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -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());
                     }
 


Mime
View raw message