rakesh-rsky commented on PR #11281:
URL: https://github.com/apache/nifi/pull/11281#issuecomment-4552228065
Thank you for the review feedback @exceptionfactory.
You're right on both points — the automatic delete-then-rename fallback was
too aggressive, and catching the general `IOException` was too broad and could
trigger a remote file deletion for unrelated failures like network errors or
permission issues.
I've reworked the approach:
- Added a Move Conflict Resolution property with two values: Fail (default,
preserves existing behaviour) and Replace (explicit opt-in).
- When Replace is selected, the processor proactively checks if the
destination exists using getRemoteFileInfo() before attempting the rename. If
it exists, it deletes it and renames. If not, it simply renames as normal.
- This removes the broad IOException catch entirely — no exception-driven
control flow, no silent destructive fallback.
- The default is Fail, so existing deployments are unaffected.
This gives users explicit control over the conflict resolution behaviour
while keeping the failure paths clean and predictable.
--
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]