allthingssecurity opened a new pull request, #28255:
URL: https://github.com/apache/camel/pull/28255

   # Description
   
   [CAMEL-25772](https://issues.apache.org/jira/browse/CAMEL-25772)
   
   Follow-up to the review of CAMEL-25728 (#28035), as promised to Claus.
   
   When the listing of a poll was cut at `maxMessagesPerPoll`, 
`GenericFileKeptDoneFiles.startBatch` removed the listed done files from the 
kept set, and `GenericFileConsumer.poll` then kept every listed done file again 
right after. The `removeAll` was undone at once, so the code did not say what 
happens.
   
   `startBatch` now leaves the kept done files as they are when the listing was 
cut, and its javadoc says that the caller keeps the done file of every listed 
file in that case. The kept set after the poll is the same as before (the done 
files kept before plus the listed ones), so the behaviour is unchanged. The 
only difference is that a listed done file is no longer out of the kept set for 
the short time between `startBatch` and the keeps, when a file of the previous 
poll that completes asynchronously could have checked it.
   
   Tests: no new test, as nothing changes in what a test can see. The done-file 
tests of camel-core (`*DoneFile*Test`, 19 classes, among them 
`FileConsumerDoneFileNameFilesLeftTest` added by CAMEL-25728 with 14 tests): 41 
run, 0 failures (formatter and import sort run in the same build).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
     (I built and tested camel-file and camel-core, including the formatter and 
import-sort plugins. I did not run the full root build.)
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
     This PR was prepared with Claude Code (Claude Opus 5.5). The commit 
carries a `Co-Authored-By` trailer.
   
   _Claude Code on behalf of allthingssecurity_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to