Spring Batch
  1. Spring Batch
  2. BATCH-1434

Corner case: job with step that repeats via a transition in a flow only executes the step once

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0.M3
    • Component/s: Core
    • Labels:
      None

      Description

      Corner case: job with step that repeats on success via a transition in a flow only executes the step once (unless the user remembers to mark it as allowStartIfComplete=true). We could detect the cycle in the flow and flag it as an error, but then the legitimate use case of retry of a failed step would break.

        Activity

        Hide
        Dave Syer added a comment -

        I decided the legitimate use case of a repeated step execution within the same job execution would be common enough to allow it by default. Part of the work on BATCH-1380 fixed that (and logs at INFO level if a duplicate step execution is detected). The only wrinkle is that if a duplicate step fails, a restart will always begin at the first instance - which is OK for the retry use case, since it was the same step definition as well, but for the case where there are two steps with the same name, it might not be what the user wanted. If anyone needs more fine-grained control, I guess another issue is probably appropriate, so I'm resolving this one.

        Show
        Dave Syer added a comment - I decided the legitimate use case of a repeated step execution within the same job execution would be common enough to allow it by default. Part of the work on BATCH-1380 fixed that (and logs at INFO level if a duplicate step execution is detected). The only wrinkle is that if a duplicate step fails, a restart will always begin at the first instance - which is OK for the retry use case, since it was the same step definition as well, but for the case where there are two steps with the same name, it might not be what the user wanted. If anyone needs more fine-grained control, I guess another issue is probably appropriate, so I'm resolving this one.

          People

          • Assignee:
            Dave Syer
            Reporter:
            Dave Syer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 20m
              20m
              Remaining:
              Remaining Estimate - 20m
              20m
              Logged:
              Time Spent - Not Specified
              Not Specified