ravinarayansingh commented on PR #10405:
URL: https://github.com/apache/nifi/pull/10405#issuecomment-3495812145

   > Thanks for the updates @ravinarayansingh.
   > 
   > Unfortunately this change appears to be running into to some fundamental 
limitations of the current design of `FetchFileTransfer`. Pushing down transfer 
relationship handling to separate methods, introducing short-circuit returns, 
and passing around large numbers of method arguments highlight some of the 
challenges.
   > 
   > It is noteworthy that the `Completion Strategy` property description 
indicates that if the strategy fails, a warning will be logged. With that in 
mind, it seems like the change should much more localized, avoiding FlowFile 
transfer and other operations in short-circuit methods.
   
   Thanks for the feedback @exceptionfactory 
   
   I’ve refactored the implementation to make the handling more localized and 
aligned with the intended design of `FetchFileTransfer`. Specifically:
   
   - Moved DELETE and MOVE strategies to a centralized pre-commit phase for 
consistent completion handling.
   - Introduced detailed failure reason constants to clearly identify each 
failure scenario.
   - Updated FlowFile routing to use `REL_PERMISSION_DENIED` and 
`REL_COMMS_FAILURE` based on the specific failure type, improving diagnostic 
clarity.
   - Enhanced unit tests to cover the updated completion strategy logic and 
verify the new failure conditions.
   
   This refactoring keeps the behavior consistent with the Completion Strategy 
description while minimizing side effects and improving maintainability.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to