incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: Fix for a corner case during fullsync where it tolerates a VM to exist on two clusters by virtue of it’s current host id and last host id (being on two diff clusters).
Date Thu, 23 Aug 2012 06:46:18 GMT
Updated Branches:
  refs/heads/master e6ef6985f -> 6f26894ea


Fix for a corner case during fullsync where it tolerates a VM to exist on two clusters by
virtue of it’s current host id and last host id (being on two diff clusters).


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

Branch: refs/heads/master
Commit: 6f26894eafce34cb2ba05285520cb5cf6cccc65a
Parents: e6ef698
Author: Abhinandan Prateek <aprateek@apache.org>
Authored: Thu Aug 23 12:13:53 2012 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Thu Aug 23 12:13:53 2012 +0530

----------------------------------------------------------------------
 server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6f26894e/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java b/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
index db4ab16..571b5d1 100644
--- a/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
+++ b/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
@@ -117,6 +117,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO,
Long> implem
         LHVMClusterSearch = createSearchBuilder();
         SearchBuilder<HostVO> hostSearch1 = _hostDao.createSearchBuilder();
         LHVMClusterSearch.join("hostSearch1", hostSearch1, hostSearch1.entity().getId(),
LHVMClusterSearch.entity().getLastHostId(), JoinType.INNER);
+        LHVMClusterSearch.and("hostid", LHVMClusterSearch.entity().getHostId(), Op.NULL);
         hostSearch1.and("clusterId", hostSearch1.entity().getClusterId(), SearchCriteria.Op.EQ);
         LHVMClusterSearch.done();
 


Mime
View raw message