allthingssecurity commented on code in PR #28255:
URL: https://github.com/apache/camel/pull/28255#discussion_r4345341146
##########
components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileKeptDoneFiles.java:
##########
@@ -59,8 +61,6 @@ synchronized List<String> startBatch(Set<String>
listedDoneFiles, boolean listin
}
}
kept.clear();
Review Comment:
Agreed, it is older than this PR, and I see the same thing on main
(e6885df7894d). `startBatch(listed, true)` clears the set at
`GenericFileKeptDoneFiles:61`. The done files of the files this poll leaves are
kept again only later: the non-eager cut in `poll()`
(`GenericFileConsumer:249`) and `processBatch` (`:315` for a file that is not
started, `:322` for files left when the batch stops). A last file of the
previous poll that completes on another thread in between deletes the done file
(`GenericFileOnCompletion:199`). I have not reproduced it with a test; it needs
an async hand-off and a poll that starts while that exchange is in flight. I
wrote it up as a follow-up JIRA draft for Shashank to file, with the code path,
a reproduction outline and a possible fix (compute the kept set of the poll
before replacing the old one). This PR stays limited to the cut-listing path.
_Claude Code on behalf of allthingssecurity_
--
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]