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

ASF subversion and git services commented on NIFI-15345:
--------------------------------------------------------

Commit 2493d3cef9a525394329d2088904fa652b07894e in nifi's branch 
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2493d3cef9a ]

NIFI-15345 Avoided calling SFTP stat when attributes not configured

- Refactored SFTPTransfer.put() to avoid getting remote file attributes when 
the PutSFTP Processor is not configured to change attributes

Signed-off-by: Pierre Villard <[email protected]>

This closes #10646.


> PutSFTP fails for servers that automatically move the file immediately after 
> upload
> -----------------------------------------------------------------------------------
>
>                 Key: NIFI-15345
>                 URL: https://issues.apache.org/jira/browse/NIFI-15345
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.6.0, 2.7.0, 2.7.1, 2.7.2
>            Reporter: Paul Kelly
>            Assignee: David Handermann
>            Priority: Major
>              Labels: SFTP
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Since NIFI-14720, NiFi now calls .stat() on the uploaded file after the 
> upload completes.  For SFTP servers that are configured to automatically move 
> a file immediately after the upload completes, this move can happen fast 
> enough that NiFi's stat call throws an error because the file no longer 
> exists.  This error causes NiFi to fail with "Failed to transfer content to 
> [remote_file_name]", and to transfer the flowfile to the failure 
> relationship, even though the file was successfully uploaded.
> The stat call should be moved to its own try/catch block away from the 
> upload, in order to handle those errors separately.  Ideally stat should only 
> be called if any attributes are going to be set, or it should be configurable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to