You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ashwin Pejavar (JIRA)" <ji...@apache.org> on 2012/07/31 00:38:33 UTC

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

Ashwin Pejavar created CAMEL-5478:
-------------------------------------

             Summary: 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

        

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

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435834#comment-13435834 ] 

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

I logged ticket
https://issues.apache.org/jira/browse/CAMEL-5513
                
> 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: Wish
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: All
>            Reporter: Ashwin Pejavar
>            Priority: Minor
>             Fix For: 2.10.1, 2.11.0
>
>
> 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

        

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

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-5478:
-------------------------------

      Priority: Minor  (was: Major)
    Issue Type: Wish  (was: Bug)
    
> 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: Wish
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: All
>            Reporter: Ashwin Pejavar
>            Priority: Minor
>
> 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

        

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

Posted by "Ashwin Pejavar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435381#comment-13435381 ] 

Ashwin Pejavar commented on CAMEL-5478:
---------------------------------------

I have a route that is triggered via a cron based policy, and has three distinct scenarios that I need to distinguish between:
1) Producer has updates to submit and generates a non-zero file
2) Producer has no updates to submit and hence generates a zero length file.
3) No file present. This is an exception scenario indicating that the producing system had an error

Basically i'm trying to distinguish between three states:
1) Value present and is non-empty
2) Value present but is null/empty
3) Value not present.

I guess this is analogous to the nillable attribute on xml element definitions that allows a element to have a null value against not being present at all.
                
> 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: Wish
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: All
>            Reporter: Ashwin Pejavar
>            Priority: Minor
>
> 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

        

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

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5478.
--------------------------------

       Resolution: Duplicate
    Fix Version/s: 2.11.0
                   2.10.1
         Assignee: Claus Ibsen

See
https://issues.apache.org/jira/browse/CAMEL-5513
                
> 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: Wish
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: All
>            Reporter: Ashwin Pejavar
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.10.1, 2.11.0
>
>
> 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

        

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

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ 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