Skip to content

Include thread-safe versions of ListItemReader and ListItemWriter to org.springframework.batch.item.support package #3741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
qwazer opened this issue Jul 8, 2020 · 2 comments
Labels

Comments

@qwazer
Copy link

qwazer commented Jul 8, 2020

Please do a quick search on Github issues first, the feature you are about to request might have already been requested.

Expected Behavior

Current Behavior

There are no thread-safe version of ListItemReader and ListItemWriter in spring-batch.
It's not possible to use make it thread-safe with SynchronizedItemStreamReader and
SynchronizedItemStreamWriter. because ListItemReader and ListItemWriter doesn' implement ItemStream interface

Context

I want to test my job in multi-threaded thread-pool executor.
Delegating of thread-safety with java.util.Collections#synchronizedList(java.util.List, java.lang.Object) doesn't work, because it doesn't prevent from unwanted read and incorrectly increase step read counts.

@qwazer qwazer added status: waiting-for-triage Issues that we did not analyse yet type: feature labels Jul 8, 2020
@qwazer
Copy link
Author

qwazer commented Jul 8, 2020

Another option is to include SynchronizedItemReader, SynchronizedItemWriter to spring-batch

@fmbenhassine
Copy link
Contributor

Adding SynchronizedItemReader and SynchronizedItemWriter to Spring Batch is a better option. I created #4368 for that. Closing this in favor of #4368.

@fmbenhassine fmbenhassine closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
@fmbenhassine fmbenhassine added status: superseded Issues that are superseded by other issues and removed status: waiting-for-triage Issues that we did not analyse yet labels May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants