You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/08/13 12:59:38 UTC

[jira] [Commented] (CAMEL-5478) File component does not consume empty files with the changed readLock

    [ https://issues.apache.org/jira/browse/CAMEL-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433057#comment-13433057 ] 

Claus Ibsen commented on CAMEL-5478:
------------------------------------

It doesnt make much sense to consume 0 length files. What is your use-case.
                
> File component does not consume empty files with the changed readLock
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-5478
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5478
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: All
>            Reporter: Ashwin Pejavar
>
> In the 2.10.0 version of the FileChangedExclusiveReadLockStrategy, a read-lock cannot be obtained on a zero length file. There is an explicit check to disallow this.
> e.g.
> if (newLastModified == lastModified && newLength == length && length != 0) {
> // We consider that zero-length files are files in progress
> LOG.trace("Read lock acquired.");
> I disagree with the reasoning in the comment. If the size of a file hasn't changed in the poll interval, it should be consumed irrespective of size.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira