Skip to content

Spring Batch Job Restart: What should be the correct values for chunk and readerPageSize with respect to grid size. #4664

Closed Answered by fmbenhassine
PSHREYASHOLLA asked this question in Q&A
Discussion options

You must be logged in to vote

1)Recommendation for restart is not using TaskExecuter. So should we not use TaskExecuter as mentioned above in step1() and slaveStep()? How to achieve concurrency ?

Restartability is not compatible with concurrency. A multi-threaded step is not restartable. However, a partitioned step is restartable. So you can achieve restartability with parallelism, not concurrency.

2)So only SimpleAsyncTaskExecutor needs to be used? If yes is it at step or slavestep?

You are setting a task executor on both step1 and slaveStep. This means the worker step will be concurrent, and therefore, not restartable. You need to remove the task executor on the worker, and keep it on the manager.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@PSHREYASHOLLA
Comment options

@fmbenhassine
Comment options

Comment options

You must be logged in to vote
1 reply
@fmbenhassine
Comment options

Answer selected by fmbenhassine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4589 on September 19, 2024 12:42.