Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.
This repository was archived by the owner on May 14, 2025. It is now read-only.

Relaunch of a Spring Boot 3/Spring Batch 5 batch doesn't work properly. #5518

@khaeghar

Description

@khaeghar

Description:
When relaunching a failed execution of a Spring Boot 3/Spring Batch 5 batch, it doesn't relaunch properly. Instead, it creates a new JobInstance and starts all over again. It also sends some weird JobExecutionParams that we are not entirely understanding, where the run.id appears multiple times with different type of values and many of our arguments are also duplicated.

Note that we are using an RunIncrementerId in our jobs.

Release versions:

2.11.X

Steps to reproduce:

The steps are:

  1. Create a job that fails in a chunk step.
  2. Try to restart it.

Screenshots:

The Job_Executions. The one we are launching first and making it fail is the number 54.

image

These are the arguments sent and recorded in the database:

image

After it fails, we relaunch, and we see these arguments:

image

And the new created JobInstance:

image

Which makes the newly restarted job not being able to pick up the execution where it left it.

Additional context:

Relaunch in Spring Boot 2 version works, our jobs didn't have any problem with that, saving the arguments correctly for the future relaunches:

image

It stays the same throughout the executions, while with Spring Boot 3 doesn't.


While debugging and trying to relaunch a SB3 job, we see that in this method

image

When mixing up the task params and the job params, it gets the run.id as a long:

image

But then it appears as a double in the database:

image

In case this helps identifying why this happens.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions