cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/4.2-forward to 52f08a4
Date Thu, 22 Aug 2013 21:57:30 GMT
Updated Branches:
  refs/heads/4.2-forward 44b2e5109 -> 52f08a4f3


CLOUDSTACK-4454:object_store - Not able to delete secondary storage when
existing snapshots are deleted. 


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

Branch: refs/heads/4.2-forward
Commit: 52f08a4f36c35ac9827a1d253b000bfcd6f9d723
Parents: 44b2e51
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Aug 22 14:56:42 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Aug 22 14:57:17 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52f08a4f/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
index bee3436..c7549ac 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
@@ -25,7 +25,6 @@ import java.util.Map;
 
 import javax.naming.ConfigurationException;
 
-import com.cloud.utils.db.SearchCriteria2;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
@@ -70,6 +69,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
         storeSearch = createSearchBuilder();
         storeSearch.and("store_id", storeSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
         storeSearch.and("store_role", storeSearch.entity().getRole(), SearchCriteria.Op.EQ);
+        storeSearch.and("state", storeSearch.entity().getState(), SearchCriteria.Op.NEQ);
         storeSearch.done();
 
         destroyedSearch = createSearchBuilder();
@@ -153,6 +153,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
         SearchCriteria<SnapshotDataStoreVO> sc = storeSearch.create();
         sc.setParameters("store_id", id);
         sc.setParameters("store_role", role);
+        sc.setParameters("state", ObjectInDataStoreStateMachine.State.Destroyed);
         return listBy(sc);
     }
 


Mime
View raw message