Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.9, 4.0.1, 4.1.0.RC1
    • Fix Version/s: 4.1.0, 4.0.2, 3.0.10
    • Component/s: Core
    • Labels:
      None

      Description

      We had a Problem in one of our batch applications, because our queue capacity was too small.
      So some of the jobs resulted in an TaskRejectedException and the job was marked as FAILED in the database. After we figured that out we wanted to restarted the failed jobs via JobOperator.restart method. This resulted in an JobExecutionAlreadyRunningException because the job had no end time and thishttps://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java#L119 check failed.

      I my opinion this behaviour is not correct and i would suggest to add a end time when a task ist rejected (https://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java#L167) so that the job could be restarted.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mbenhassine Mahmoud Ben Hassine
                Reporter:
                nekator Heiko Does
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: