Skip to content

Commit 65761f7

Browse files
review changes
1 parent 609a9e2 commit 65761f7

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

engine/schema/src/main/java/com/cloud/host/dao/HostDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ public HostVO findAnyStateHypervisorHostInCluster(long clusterId) {
13481348
SearchCriteria<HostVO> sc = TypeClusterStatusSearch.create();
13491349
sc.setParameters("type", Host.Type.Routing);
13501350
sc.setParameters("cluster", clusterId);
1351-
List<HostVO> list = listBy(sc, new Filter(1));
1351+
List<HostVO> list = listBy(sc, new Filter(1, true));
13521352
return list.isEmpty() ? null : list.get(0);
13531353
}
13541354

engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public ImageStoreVO findOneByZoneAndProtocol(long dataCenterId, String protocol)
202202
sc.setParameters("dataCenterId", dataCenterId);
203203
sc.setParameters("protocol", protocol);
204204
sc.setParameters("role", DataStoreRole.Image);
205-
Filter filter = new Filter(1);
205+
Filter filter = new Filter(1, true);
206206
List<ImageStoreVO> results = listBy(sc, filter);
207207
return results.size() == 0 ? null : results.get(0);
208208
}

framework/db/src/main/java/com/cloud/utils/db/GenericDaoBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public List<T> lockRows(final SearchCriteria<T> sc, final Filter filter, final b
347347
@Override
348348
@DB()
349349
public T lockOneRandomRow(final SearchCriteria<T> sc, final boolean exclusive) {
350-
final Filter filter = new Filter(1);
350+
final Filter filter = new Filter(1, true);
351351
final List<T> beans = search(sc, filter, exclusive, true);
352352
return beans.isEmpty() ? null : beans.get(0);
353353
}
@@ -927,7 +927,7 @@ public Class<T> getEntityBeanType() {
927927

928928
@DB()
929929
protected T findOneIncludingRemovedBy(final SearchCriteria<T> sc) {
930-
Filter filter = new Filter(1);
930+
Filter filter = new Filter(1, true);
931931
List<T> results = searchIncludingRemoved(sc, filter, null, false);
932932
assert results.size() <= 1 : "Didn't the limiting worked?";
933933
return results.size() == 0 ? null : results.get(0);

0 commit comments

Comments
 (0)