spring-projects / spring-projects/spring-batch

Number of requests to BATCH_JOB_EXECUTION_PARAMS depending on the number of previous executions

Open
#4,499 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

Bug description
Between version 4.3.8 and 4.3.9, an increase in the number of requests on table BATCH_JOB_EXECUTION_PARAMS is observed. With each new batch execution, there is one an additional request.

Environment

  • Java 17
  • spring-boot-starter-parent 2.7.17
  • postgresql
  • spring-batch-core 4.3.9 (or 4.3.8 to show the difference)

Steps to reproduce
Run the same batch with allowStartIfComplete=true several times.
The number of SELECT is increasing by one each time.
spring-batch-demo.zip

Expected behavior
The number of SELECT should not be dependent on the number of previous executions.
With large history on table BATCH_JOB_EXECUTION_PARAMS, the number of SELECT is equally important. Considering this table has no index, there is a performance issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached spring-batch-demo.zip and run the same batch repeatedly with allowStartIfComplete=true on Spring Batch 4.3.8 and 4.3.9. Trace the SELECTs against BATCH_JOB_EXECUTION_PARAMS and compare how their count changes with previous executions. Done means the request count no longer grows with execution history, with regression coverage for the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql, spring
Domain
backend, databases, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.