Skip to content
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

Commit interval [BATCH-2534] #1069

Closed
spring-projects-issues opened this issue Sep 15, 2016 · 0 comments
Closed

Commit interval [BATCH-2534] #1069

spring-projects-issues opened this issue Sep 15, 2016 · 0 comments
Labels
in: core status: duplicate Issues that are duplicates of other issues type: bug

Comments

@spring-projects-issues
Copy link
Collaborator

sunny bindal opened BATCH-2534 and commented

according to the logic commit interval work as these:-
List items = new Arraylist();
for(int i = 0; i < commitInterval; i++){
Object item = itemReader.read()
Object processedItem = itemProcessor.process(item);
items.add(processedItem);
}
itemWriter.write(items);

BUt in actually it is not as specified in "org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(StepContribution, ChunkContext)" it first read to the full commit interval then process and then calls write. It is :-

List items = new Arraylist();
for(int i = 0; i < commitInterval; i++){
Object item = itemReader.read()
items.add(processedItem);
}for(int i = 0; i < commitInterval; i++){
Object processedItem = itemProcessor.process(item);
}
itemWriter.write(items);

Please look into this.


Affects: 3.0.7

Issue Links:

  • BATCH-2423 5.1 Chunk-Oriented Processing does not represent the actual implementation
    ("duplicates")
@spring-projects-issues spring-projects-issues added type: bug in: core status: duplicate Issues that are duplicates of other issues labels Dec 16, 2019
fmbenhassine added a commit that referenced this issue Mar 11, 2021
fmbenhassine added a commit that referenced this issue Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: duplicate Issues that are duplicates of other issues type: bug
Projects
None yet
Development

No branches or pull requests

1 participant