Skip to content

Commit da477f6

Browse files
committed
use space in sql
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent f63fcea commit da477f6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5038,15 +5038,15 @@ private List<VMInstanceVO> listVMInTransitionStateWithRecentReportOnUpHost(
50385038
}
50395039

50405040
private List<Long> listStalledVMInTransitionStateOnDisconnectedHosts(final Date cutTime) {
5041-
final String sql = "SELECT i.*\n" +
5042-
"FROM vm_instance AS i\n" +
5043-
"INNER JOIN host AS h ON i.host_id = h.id\n" +
5044-
"WHERE h.status != 'UP' \n" +
5045-
" AND i.power_state_update_time < ?\n" +
5046-
" AND i.state IN ('Starting', 'Stopping', 'Migrating')\n" +
5047-
" AND i.id NOT IN (SELECT vm_instance_id FROM vm_work_job AS w\n" +
5048-
" INNER JOIN async_job AS j ON w.id = j.id\n" +
5049-
" WHERE j.job_status = ?)\n" +
5041+
final String sql = "SELECT i.* " +
5042+
"FROM vm_instance AS i " +
5043+
"INNER JOIN host AS h ON i.host_id = h.id " +
5044+
"WHERE h.status != 'UP' " +
5045+
" AND i.power_state_update_time < ? " +
5046+
" AND i.state IN ('Starting', 'Stopping', 'Migrating') " +
5047+
" AND i.id NOT IN (SELECT vm_instance_id FROM vm_work_job AS w " +
5048+
" INNER JOIN async_job AS j ON w.id = j.id " +
5049+
" WHERE j.job_status = ?) " +
50505050
" AND i.removed IS NULL";
50515051

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

0 commit comments

Comments
 (0)