Skip to content

Commit 4cd164d

Browse files
committed
Update 11573: order mgmt servers by id
1 parent e1ddb41 commit 4cd164d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

framework/cluster/src/main/java/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ public ManagementServerHostVO findOneInUpStateByLongestRuntime() {
286286
public ManagementServerHostVO findOneInUpStateByClassName(String className) {
287287
SearchCriteria<ManagementServerHostVO> sc = StateSearch.create();
288288
sc.setParameters("state", ManagementServerHost.State.Up);
289-
List<ManagementServerHostVO> mshosts = listBy(sc, null);
289+
Filter filter = new Filter(ManagementServerHostVO.class, "id", true, null, null);
290+
List<ManagementServerHostVO> mshosts = listBy(sc, filter);
290291
if (CollectionUtils.isEmpty(mshosts)) {
291292
return null;
292293
}

0 commit comments

Comments
 (0)