Skip to content

StepExecutionContext gets updated on transaction rollback #1145

Open
@spring-projects-issues

Description

@spring-projects-issues

Daniel Stuckert opened BATCH-2457 and commented

When an exception is thrown in a chunked step and the execution context has been updated while processing items the execution context gets updated. This causes a problem when information about the processed items has been stored in the context. The business transaction has been rolled back and the items have not been committed to the database, but the execution context does not reflect the rollback.

The expectation is that the execution context gets rolled back.

To reproduce the problem run the attached test

The read and write-count have a similar problem. They get updated as well when the transaction is rolled back.


Affects: 3.0.5

Attachments:

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