nvazquez commented on code in PR #7977:
URL: https://github.com/apache/cloudstack/pull/7977#discussion_r1353988239
##########
framework/cluster/src/main/java/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java:
##########
@@ -272,4 +274,14 @@ public ManagementServerHostVO findOneInUpState(Filter
filter) {
return null;
}
+ @Override
+ public ManagementServerHostVO findOneByLongestRuntime() {
+ SearchCriteria<ManagementServerHostVO> sc = StateSearch.create();
+ sc.setParameters("state", ManagementServerHost.State.Up);
+ sc.setParameters("runid", 0);
+ Filter filter = new Filter(ManagementServerHostVO.class, "runid",
true, 0L, 1L);
Review Comment:
In such cases would the runid field get updated? If that is the case then
another management server will acquire the lock for this task
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]