Skip to content

Commit

Permalink
use space in sql
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Kumar <[email protected]>
  • Loading branch information
shwstppr committed Nov 5, 2024
1 parent f63fcea commit da477f6
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5038,15 +5038,15 @@ private List<VMInstanceVO> listVMInTransitionStateWithRecentReportOnUpHost(
}

private List<Long> listStalledVMInTransitionStateOnDisconnectedHosts(final Date cutTime) {
final String sql = "SELECT i.*\n" +
"FROM vm_instance AS i\n" +
"INNER JOIN host AS h ON i.host_id = h.id\n" +
"WHERE h.status != 'UP' \n" +
" AND i.power_state_update_time < ?\n" +
" AND i.state IN ('Starting', 'Stopping', 'Migrating')\n" +
" AND i.id NOT IN (SELECT vm_instance_id FROM vm_work_job AS w\n" +
" INNER JOIN async_job AS j ON w.id = j.id\n" +
" WHERE j.job_status = ?)\n" +
final String sql = "SELECT i.* " +

Check warning on line 5041 in engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

View check run for this annotation

Codecov / codecov/patch

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java#L5041

Added line #L5041 was not covered by tests
"FROM vm_instance AS i " +
"INNER JOIN host AS h ON i.host_id = h.id " +
"WHERE h.status != 'UP' " +
" AND i.power_state_update_time < ? " +
" AND i.state IN ('Starting', 'Stopping', 'Migrating') " +
" AND i.id NOT IN (SELECT vm_instance_id FROM vm_work_job AS w " +
" INNER JOIN async_job AS j ON w.id = j.id " +
" WHERE j.job_status = ?) " +
" AND i.removed IS NULL";

final List<Long> l = new ArrayList<>();
Expand Down

0 comments on commit da477f6

Please sign in to comment.