You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running a job causes retrieval of full history of job executions #4169
The approach to create new executions should be revised towards constant timing and constant memory usage regardless of how many times a job was executed in past.
My proposal would be to change a query to limit response size, e.g. last execution is enough to make a decision if running job instance exist.
@glaz666 I think the retrieval of job executions is required to validate a few conditions (see here). But if we find a way to improve the performance of that part without introducing any regression, I am all for it!
@ioanadinuit Thank you for your offer to help! Sure, you are welcome to contribute if you want.
A good start on this issue is to provide a minimal example that we can use to validate the performance issue and also as a comparison baseline with the improved version.
The minimal example and comparison baseline you asked for are attached to #5495, where the
statement count still grows with the number of past executions on 5.2.2 and does so about
eight times more steeply on 6.0.4. The retrieval has moved since this issue was filed: it
now happens in the restart check in TaskExecutorJobLauncher.createJobExecution, which
reads the history through jobRepository.getJobExecutions(jobInstance).
Activity
ioanadinuit commentedon Feb 10, 2023
Hi, is there any plan to make this enhancement? I would be happy to contribute.
fmbenhassine commentedon Feb 17, 2023
@glaz666 I think the retrieval of job executions is required to validate a few conditions (see here). But if we find a way to improve the performance of that part without introducing any regression, I am all for it!
@ioanadinuit Thank you for your offer to help! Sure, you are welcome to contribute if you want.
fmbenhassine commentedon Apr 5, 2023
A good start on this issue is to provide a minimal example that we can use to validate the performance issue and also as a comparison baseline with the improved version.
jjh75607 commentedon Aug 23, 2026
The minimal example and comparison baseline you asked for are attached to #5495, where the
statement count still grows with the number of past executions on 5.2.2 and does so about
eight times more steeply on 6.0.4. The retrieval has moved since this issue was filed: it
now happens in the restart check in
TaskExecutorJobLauncher.createJobExecution, whichreads the history through
jobRepository.getJobExecutions(jobInstance).Check only the last execution when restarting a job instance
Check only the last execution when restarting a job instance