DaanHoogland commented on code in PR #9125:
URL: https://github.com/apache/cloudstack/pull/9125#discussion_r1634287418
##########
engine/storage/src/main/java/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java:
##########
@@ -536,7 +536,7 @@ private Integer getCopyCmdsCountToSpecificSSVM(Long ssvmId)
{
private List<Long> ssvmWithLeastMigrateJobs() {
logger.debug("Picking ssvm from the pool with least commands running
on it");
- String query = "select host_id, count(*) from cmd_exec_log group by
host_id order by 2;";
+ String query = "select cel.host_id, count(*) from cmd_exec_log cel
join host h on cel.host_id = h.id where h.removed is NULL group by cel.host_id
order by 2;";
Review Comment:
```suggestion
// TODO: this should be moved to the DAO layer or an extra view layer on top
of it.
String query = "select cel.host_id, count(*) from cmd_exec_log cel
join host h on cel.host_id = h.id where h.removed is NULL group by cel.host_id
order by 2;";
```
--
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]