Skip to content
Discussion options

You must be logged in to vote

Yes, with the new concurrency model, the reader is only called by a single thread and does not have to be thread-safe. I gave some details about that here: #4955 (comment). Does that clarify things better for you?

I need to write about that elsewhere for more visibility.

Chapter https://docs.spring.io/spring-batch/reference/scalability.html#multithreadedStep of the reference documentation still mentions the need for a thread safe reader.

That's an oversight, I will update the documentation accordingly.

Are there other usecases where a thread-safe reader is still needed ?

Not with the step implementations provided by Spring Batch. We kept the synchronised wrappers around for anyone imp…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ctrung
Comment options

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

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