cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [08/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886
Date Fri, 28 Nov 2014 18:03:22 GMT
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 <sudison@gmail.com>
Authored: Mon Nov 24 14:25:29 2014 -0800
Committer: Edison Su <sudison@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());
                     }
 


Mime
View raw message