Skip to content

Retry transaction in case of deadlock [BATCH-2452] #1150

Open
@spring-projects-issues

Description

@spring-projects-issues

Marrache Mickael opened BATCH-2452 and commented

I have multiple threads that concurrently launch jobs using a shared synchronous job launcher. For some reason, I get deadlock while issuing the INSERT statements for creating the job instances. The deadlock occurs even with a single INSERT per transaction because of the unique constraint defined on the JOB_INSTANCE table (on job name and job key). Ideally, I would like to avoid such deadlocks but I didn't find a solution. Inserting job instances in a well defined order is not possible. Therefore, I expect Spring Batch to retry the transaction instead of directly throwing the deadlock exception. However, it doesn't seem to be the case.


No further details from BATCH-2452

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