winterhazel commented on PR #12598:
URL: https://github.com/apache/cloudstack/pull/12598#issuecomment-3872615299

   > > @sureshanaparti btw, I think that it may be good to change the usages of 
`Filter(long limit)` to `Filter(long limit, true)` for the sake of clarity, and 
either remove `Filter(long limit)` or change it to `this(limit, false)` to 
avoid unintended behavior in the future
   > 
   > @winterhazel there are references with Filter(1) and random sorting 
doesn't make sense there, updated `Filter(long limit)` to call `this(limit, 
false)`.
   
   @sureshanaparti the random sorting does make sense in 
`com.cloud.utils.db.GenericDaoBase#lockOneRandomRow` and 
`com.cloud.utils.db.GenericDaoBase#findOneIncludingRemovedBy`, 
`com.cloud.host.dao.HostDaoImpl#findAnyStateHypervisorHostInCluster`, and 
`org.apache.cloudstack.storage.datastore.db.ImageStoreDaoImpl#findOneByZoneAndProtocol`.
 Could you update those to call `Filter(1, true)` to restore the previous 
behavior?


-- 
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]

Reply via email to