rohityadavcloud commented on code in PR #4438:
URL: https://github.com/apache/cloudstack/pull/4438#discussion_r911796459
##########
engine/schema/src/main/java/com/cloud/capacity/dao/CapacityDaoImpl.java:
##########
@@ -203,11 +205,15 @@ public class CapacityDaoImpl extends
GenericDaoBase<CapacityVO, Long> implements
"FROM (SELECT vi.data_center_id, (CASE WHEN
ISNULL(service_offering.cpu) THEN custom_cpu.value ELSE service_offering.cpu
end) AS cpu, " +
"(CASE WHEN ISNULL(service_offering.speed) THEN
custom_speed.value ELSE service_offering.speed end) AS speed, " +
"(CASE WHEN ISNULL(service_offering.ram_size) THEN
custom_ram_size.value ELSE service_offering.ram_size end) AS ram_size " +
- "FROM (((vm_instance vi LEFT JOIN service_offering
ON(((vi.service_offering_id = service_offering.id))) " +
- "LEFT JOIN user_vm_details custom_cpu ON(((custom_cpu.vm_id =
vi.id) AND (custom_cpu.name = 'CpuNumber')))) " +
- "LEFT JOIN user_vm_details custom_speed
ON(((custom_speed.vm_id = vi.id) AND (custom_speed.name = 'CpuSpeed')))) " +
- "LEFT JOIN user_vm_details custom_ram_size
ON(((custom_ram_size.vm_id = vi.id) AND (custom_ram_size.name = 'memory')))) " +
- "WHERE ISNULL(vi.removed) AND vi.state NOT IN ('Destroyed',
'Error', 'Expunging')";
+ "FROM vm_instance vi LEFT JOIN service_offering
ON(((vi.service_offering_id = service_offering.id))) " +
Review Comment:
Hi @soreana could you confirm if my concerns are valid, or we can go ahead
and merge the PR?
--
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]