Skip to content

ExecutionContext.isDirty() is not very accurate [BATCH-1566] #2020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue May 12, 2010 · 2 comments
Closed

Comments

@spring-projects-issues
Copy link
Collaborator

Dave Syer opened BATCH-1566 and commented

A context is only dirty if a new value is put or an old one is removed, but the implementation sets dirty on all puts.


Referenced from: commits 963142c

@spring-projects-issues
Copy link
Collaborator Author

Dave Syer commented

Fixed with check involving comparing the result of map.put/remove with the value passed in.

@spring-projects-issues
Copy link
Collaborator Author

Chris French commented

Should the fix check if the flag is already dirty as well before setting it to false in cases where the put is the same value as exists? If the isDirty flag is already true shouldn't it remain dirty/true? I just noticed this in the SimpleStepExecutionSplitter where the isDirty flag on restart is false. In our case the previous execution failed in the partition method so the partition method needs to be called again to set the contexts up. Seems like this dirty flag is the culprit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant