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 2016/05/17 06:53:12 UTC

[jira] [Commented] (CAMEL-9970) CamelFileLength header is wrong for long write file

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

Claus Ibsen commented on CAMEL-9970:
------------------------------------

Should probably do this in a way to reapply the file headers after the lock was granted so it works generic.

> CamelFileLength header is wrong for long write file
> ---------------------------------------------------
>
>                 Key: CAMEL-9970
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9970
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.16.3
>            Reporter: Sergey Monichev
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.18.0
>
>         Attachments: CAMEL_9970__CamelFileLength_header_is_wrong_for_long_write_file.patch
>
>
> Given a long write file slowfile.dat. Camel polls the file and stores its parameters (length, lastModified...). Camel tries to get exclusive read lock and fails as file is writing by someone, next time Camel gets lock. But file was changed and its parameters are wrong.
> The solution is pretty simple - check the file length and lastModified when exclusive read lock is granted and update them.
> Here is a patch: http://pastebin.com/2vyF8BTU



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)