Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9970

CamelFileLength header is wrong for long write file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.16.3
    • Fix Version/s: 2.18.0
    • Component/s: camel-core
    • Labels:
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Novice
    • Flags:
      Patch

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                sergey.monichev Sergey Monichev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: