Skip to content

Spring Batch 6 breaks compatibility with existing job keys #5283

@aaronp-xcend

Description

@aaronp-xcend

Note: I'm not actually sure whether this is intentional or not. If it is, I didn't see any mention of it, but it feels like something that should explicitly be mentioned in the Spring Batch 6 migration guide. The docs do mention changes to the Job Parameter APIs, but they don't seem to indicate that these changes will affect persisted data.

DefaultJobKeyGenerator was refactored here: 86dh@2d9bbae#diff-6e38cfa7139610dfc635ee6285d477356902cd01916529efa2fbca15ab6b1b01

The refactor changes the format of generated job keys, breaking backward compatibility with keys stored in the job repository database for existing job instances.

Old format: key={value=..., type=..., identifying=...}
New format: JobParameter{name='...', value=..., type=..., identifying=...}

Jobs with the same parameters will generate different keys, potentially preventing applications on Spring Batch 6 from finding existing job executions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions