Skip to content

Commit c0547c6

Browse files
marschallfmbenhassine
authored andcommitted
Remove sorting from JdbcJobExecutionDao#GET_RUNNING_EXECUTIONS
Remove the sorting from JdbcJobExecutionDao#GET_RUNNING_EXECUTIONS because #findRunningJobExecutions returns an unsorted HashSet. Resolves #3987
1 parent bbf35b7 commit c0547c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
8888
+ " from %PREFIX%JOB_EXECUTION where JOB_EXECUTION_ID = ?";
8989

9090
private static final String GET_RUNNING_EXECUTIONS = "SELECT E.JOB_EXECUTION_ID, E.START_TIME, E.END_TIME, E.STATUS, E.EXIT_CODE, E.EXIT_MESSAGE, E.CREATE_TIME, E.LAST_UPDATED, E.VERSION, "
91-
+ "E.JOB_INSTANCE_ID from %PREFIX%JOB_EXECUTION E, %PREFIX%JOB_INSTANCE I where E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID and I.JOB_NAME=? and E.STATUS in ('STARTING', 'STARTED', 'STOPPING') order by E.JOB_EXECUTION_ID desc";
91+
+ "E.JOB_INSTANCE_ID from %PREFIX%JOB_EXECUTION E, %PREFIX%JOB_INSTANCE I where E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID and I.JOB_NAME=? and E.STATUS in ('STARTING', 'STARTED', 'STOPPING')";
9292

9393
private static final String CURRENT_VERSION_JOB_EXECUTION = "SELECT VERSION FROM %PREFIX%JOB_EXECUTION WHERE JOB_EXECUTION_ID=?";
9494

0 commit comments

Comments
 (0)