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

SFTP using PollEnrich with "disconnect=true" and "delete=true" does NOT delete the file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.13.1
    • 2.15.1, 2.16.0
    • camel-ftp
    • Occurs on both Windows 7 and CentOS 6.4 against multiple SFTP servers.

    • Patch Available
    • Unknown
    • Unit Test Broken

    Description

      Attached are two test cases - one with a "non-pollEnrich" test (which works fine) and one with a "pollEnrich" test (which fails).

      In stepping through some of the code, it appears that the "disconnect" and "delete" are on two different threads (true for both scenarios). However, for the "non-pollEnrich" test, there seems to be a cycle that allows the timing of the two threads to NOT be an issue. For the "pollEnrich" test, that cycle doesn't seem to occur.

      My uneducated guess is that both tests (code executions) are checking to see if the "from" has completed (including performing the delete) before disconnecting. This makes sense for the "non-pollEnrich" test, but for the "pollEnrich" it should be checking to see if the "pollEnrich" is done, not the "from".

      Please note that if you do not indicate "disconnect=true", file deletion occurs as expected. This seems to be broken in 2.12.x through 2.13.1 (not sure if it goes back further or not).

      I have attached two different test cases to show the different behaviors ("non-pollEnrich" vs "pollEnrich").

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            yarddog Steve Ardis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: