-
Bug
-
Resolution: Done
-
Critical
-
1.1.0.Final
-
None
I have a batch job containing a partitioned step. I need to start a dynamic number of instances of this job.
Assuming a configured jbatch thread pool size of n, starting n job instances all at once causes all the instances to deadlock. This is because each job instance consumes 1 "main" thread of the thread pool to start the job. Once the partitioned step is started, there are no free threads available any more and all executions are waiting for completed partition threads in StepExecutionRunner:329.
Possible solutions:
- Obtain the coordinator (aka "main") thread from a separate thread pool which would ensure that at least 1 batch thread is available for partition execution (assuming the number of batch threads is greater than 0).
- Before actually starting the execution of a job, check if the job contains partitioned steps and, if yes, reserve at least 2 threads from the pool.
- is related to
-
JBERET-125 Split may cause deadlock
- Resolved
There are no Sub-Tasks for this issue.