zhangyue19921010 opened a new issue, #11208: URL: https://github.com/apache/paimon/issues/11208
### Search before asking - [x] I searched in the issues and found nothing similar. ### Paimon version 2.2-SNAPSHOT, commit `00b4d05a6cc118091a38eeca23549519cfb775f4`. ### Compute Engine Java core API on JDK 11.0.18; the Flink batch compact source repeatedly consumes the same coordinator. ### Minimal reproduce step 1. Create an ordinary bucket-unaware append table and commit ten small files, each containing one row. 2. Construct a batch `AppendCompactCoordinator` with `compaction.file-num-limit=5` and `compaction.min.file-num=3`. 3. Collect tasks from repeated `run()` calls until the batch finishes. Only nine original files appear in the tasks or retained files. The first chunk scans five files, then consumes the sixth to determine `batchRemainFiles`; the next chunk starts with the seventh. The regression uses real writer, commit, manifest scan and read APIs. The ten rows are readable before planning. ### What doesn't meet your expectations? Checking whether another batch exists should preserve that file for the next scan. The omitted file remains committed and readable, but this batch compaction never selects it. Cache the lookahead entry in `FilesIterator` and have `next()` consume it first. Keep the configured scan bound and existing streaming behavior. ### Anything else? Five table cases cover multiple chunks, an exact boundary, fewer files than the limit and a final singleton. On unchanged production, all three multiple-chunk cases fail file-identity coverage. With the fix, all cases execute/commit their compaction tasks and preserve every row; each task stays within the five-file bound. AI-generated with TRAE CLI (GPT-6.1-Sol). ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
