spring-projects / spring-projects/spring-batch
flatfileitemwriter will override the lines before restart job [BATCH-2631]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
vincentruan opened BATCH-2631 and commented
If the writing data contains Chinese character, the default writer 'TransactionAwareBufferedWriter' of FlatFileItemWriter will get the wrong position of file channel when restart job, and override the lines before it.
Affects: 2.1.9
Reference URL: https://stackoverflow.com/questions/45100559/flatfileitemwriter-will-override-the-lines-before-restart-job#
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FlatFileItemWriter and its default TransactionAwareBufferedWriter, focusing on file-channel positioning during job restart. Reproduce the reported case with Chinese characters on Spring Batch 2.1.9 and verify that restarting the job appends at the correct position without overwriting earlier lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100