[
https://issues.apache.org/jira/browse/CAMEL-27384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27384 started by shashank.
----------------------------------------
> camel-file - with recursive=true and a done file with a fixed name, a poll
> deletes only the done file of the directory of its last file, and the next
> files of the other directories are consumed without a done file
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27384
> URL: https://issues.apache.org/jira/browse/CAMEL-27384
> Project: Camel
> Issue Type: Bug
> Components: camel-file
> Reporter: shashank
> Assignee: shashank
> Priority: Major
>
> h3. What happens
> With {{recursive=true}} and {{doneFileName=ready}}, each directory has its
> own done file. A poll sets {{BATCH_COMPLETE}} on its last exchange only, and
> {{GenericFileOnCompletion.handleDoneFile}} deletes the done file of that
> exchange only. When a poll consumes files of several directories, the done
> files of all directories but the one of the last file stay. The next file a
> producer writes into such a directory is consumed at once without a new done
> file (with {{readLock=none}} possibly while it is still written). The docs
> say the done file is deleted when its files are consumed.
> h3. How to reproduce
> {{d1/a.txt}}, {{d1/ready}}, {{d2/b.txt}}, {{d2/ready}}, a route from
> {{file:in?doneFileName=ready&recursive=true}}. One poll consumes both files
> and deletes one done file; the other stays, and a later {{d1/next.txt}}
> without a done file is consumed.
> Found with a TLA+ model.
> h3. Fix
> The last file of each done file among the files of the poll deletes that done
> file (unless the poll kept it for files it left). {{BATCH_COMPLETE}} is
> unchanged; without {{recursive=true}} nothing changes. Upgrade guide entry
> for 4.24.
> _Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)