spring-projects / spring-projects/spring-batch

flatfileitemwriter will override the lines before restart job [BATCH-2631]

Open
#974 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: core status: waiting-for-triage type: bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.