camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ardis (JIRA)" <>
Subject [jira] [Commented] (CAMEL-7565) SFTP using PollEnrich with "disconnect=true" and "delete=true" does NOT delete the file
Date Wed, 02 Jul 2014 17:41:26 GMT


Steve Ardis commented on CAMEL-7565:

Claus - 

I either have to come up with some hack using a bean and ConsumerTemplate, or given I can
get my head around the fix you are suggesting, I can look into trying to create a patch for
this issue.  I have breakpoints in the code at SftpConsumer.postPollCheck() (which does the
disconnect and is NOT in the UOW) and GenericFileDeleteProcessStrategy.commit() (which does
the delete and is in the UOW).  If it was easy enough to point me towards the piece of code(s)
that I might be able to move from A to B, I can test it and submit a patch.

> SFTP using PollEnrich with "disconnect=true" and "delete=true" does NOT delete the file
> ---------------------------------------------------------------------------------------
>                 Key: CAMEL-7565
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.13.1
>         Environment: Occurs on both Windows 7 and CentOS 6.4 against multiple SFTP servers.
>            Reporter: Steve Ardis
>            Assignee: Claus Ibsen
>            Priority: Minor
>              Labels: delete, disconnection, pollenrich, sftp
>             Fix For: 2.13.3, 2.14.0
>         Attachments:,
> 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").

This message was sent by Atlassian JIRA

View raw message