davsclaus opened a new pull request, #24748: URL: https://github.com/apache/camel/pull/24748
## Summary Fix two bugs in all three idempotent read-lock strategies (`FileIdempotentRepositoryReadLockStrategy`, `FileIdempotentChangedRepositoryReadLockStrategy`, `FileIdempotentRenameRepositoryReadLockStrategy`): - **Key mismatch after preMove**: `asKey()` used `file.getAbsoluteFilePath()` which reflects the post-preMove path. The acquire call stores a key based on the original path, but release computes the key from the renamed path — `remove`/`confirm` targets a key that was never added, and the original key stays in the repository forever. Same-named files arriving later are silently never consumed. Now uses `getCopyFromAbsoluteFilePath()` when available, matching the pattern already used by `MarkerFileExclusiveReadLockStrategy.asReadLockKey` and `GenericFileHelper.asExclusiveReadLockKey`. - **Abort leaks idempotent key**: `releaseExclusiveReadLockOnAbort` was a no-op in `FileIdempotentRepositoryReadLockStrategy` and only delegated to the inner strategy (without touching the idempotent repository) in the other two. An abort after successful acquire leaked the key permanently. ## Test plan - [x] New `FileIdempotentReadLockPreMoveTest` — consumer with `readLock=idempotent&preMove=work` and a failing route; asserts the original-path key is removed from the repository on rollback - [x] All existing idempotent read lock tests pass (6/6) _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]
