spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Partitioned restart fails [BATCH-1992]

Open spring-projects-issues opened this issue 12 years ago • 1 comments
trafficstars

Chris French opened BATCH-1992 and commented

When the partitioner fails during the initial attempt to partition, upon restart the partition method is skipped.

Issue appears to be here:

org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter#getContexts

For some reason the isDirty flag is set to false on restart after the put of the gridsize, which forces the code into a mode that assumes the partition was already completed even though it has not. My 2 cents is I feel like the code in the "put" that sets the isDirty flag is suspect since it does not check if the context is already dirty when determining if the new put value is equal to an existing value. Seems if it's already dirty you shouldn't be making it clean just because your put value matches a preexisting value.


Affects: 2.1.9

spring-projects-issues avatar Apr 10 '13 09:04 spring-projects-issues

Thank you for opening the issue. Can you retry with the latest release of Spring Batch(5.0.2) and report back the results?

If the issue is still present, can you provide a sample project that uses the latest release of Spring Batch and that exhibits the behavior? To help you in reporting your issue, we have prepared a project template that you can use as a starting point. Please check the Issue Reporting Guidelines for more details about this.

cppwfs avatar Jul 20 '23 13:07 cppwfs