davsclaus opened a new pull request, #30876: URL: https://github.com/apache/camel/pull/30876
JIRA: https://issues.apache.org/jira/browse/CAMEL-25916 ## Problem `FtpOperations.deleteFile()` and `renameFile()` call `reconnectIfNecessary()`, which sent a `NOOP` whenever the client was connected, whatever `sendNoop` was set to. So for ftp and ftps, `sendNoop=false` turned off the producer's pre-write check and (since CAMEL-25896) the consumer's pre-poll check, but the consumer still sent a `NOOP` for each file it deleted or moved, and the producer one before each `tempFileName` rename or delete of an existing / done file. ## Change - `FtpOperations.reconnectIfNecessary()` (ftp and ftps) follows `sendNoop`: with `sendNoop=false` it only checks `isConnected()`, like the pre-poll and pre-write checks. With the default `sendNoop=true` nothing changes. - `SftpOperations` and `MinaSftpOperations` already only check `isConnected()` before a rename or delete; unchanged. - The `sendNoop` option description (shared by ftp, ftps, sftp and mina-sftp) says it also covers the `NOOP` before a rename or delete on ftp/ftps, and that with `sendNoop=false` a rename or delete after a long-running route fails if the server closed the idle connection meanwhile, so the file stays and is polled again unless an idempotent repository prevents that. Regenerated component JSONs, catalog and endpoint DSL. - The existing 4.24 upgrade-guide entry for `sendNoop` (which said the ftp/ftps consumer still sent the `NOOP` before a rename or delete) now describes the new behaviour and the trade-off. ## Tests - New `FtpRenameDeleteSendNoopIT` records the commands the embedded FTP server sees, for a consumer with `delete=true`, a consumer with `move=done` and a producer with `tempFileName`, each with `sendNoop=false` and the default. With the default a `NOOP` comes between the transfer (`RETR`/`STOR`) and the `DELE`/`RNFR`; with `sendNoop=false` no `NOOP` is sent at all. - Fails on main: the three `sendNoop=false` cases fail (e.g. `[..., RETR, NOOP, DELE, ...]`); passes with the fix. - `camel-ftp` module: unit tests and integration tests pass (see below). ## Upgrade notes Only endpoints that set `sendNoop=false` are affected; the 4.24 upgrade guide entry is updated. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
