Skip to content
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

SimpleJobRepository.deleteJobExecution does not follow API contract #4249

Closed
marschall opened this issue Nov 25, 2022 · 0 comments
Closed

SimpleJobRepository.deleteJobExecution does not follow API contract #4249

marschall opened this issue Nov 25, 2022 · 0 comments

Comments

@marschall
Copy link
Contributor

marschall commented Nov 25, 2022

Bug description
org.springframework.batch.core.repository.support.SimpleJobRepository#deleteJobExecution(JobExecution) does not follow the API contract outlined in org.springframework.batch.core.repository.JobRepository#deleteJobExecution(JobExecution).

Delete the job execution object graph (ie the job execution with its execution context, all related step executions and their executions contexts, as well as associated job parameters)

Yet SimpleJobRepository does not such thing. It only deletes the job execution with its execution context as well as associated job parameters. That's why JobRepositoryTestUtils#removeJobExecution(JobExecution) has to iterate over the StepExecutions, see #4242.

Environment
Spring Batch: 5.0.0

Steps to reproduce

  • create a JobExecution with StepExecutions
  • call JobRepository#deleteJobExecution(JobExecution) without calling JobRepository#deleteStepExecution(StepExecution) first

Expected behavior

SimpleJobRepository.deleteJobExecution follows the API contract and deletes step executions and step execution contexts as well.

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

2 participants