gnodet-bot commented on PR #30759:
URL: https://github.com/apache/camel/pull/30759#issuecomment-7156536116

   **Additional notes:**
   
   **`doStop()` design intent:** `doStop()` calls `interrupt(entry)` directly 
on each snapshotted `AwaitThreadEntry`, releasing every thread including nested 
ones simultaneously. This is correct during shutdown (the Javadoc on 
`interrupt(Exchange)` says "Stopping the manager releases every blocked 
thread"). A brief comment at the loop — `// releases all entries, not only the 
innermost: shutdown must release every blocked thread` — would prevent a future 
maintainer from "fixing" it to `interrupt(entry.getExchange())` and 
re-introducing the dual-routing risk.
   
   **`interrupt(String)` coverage:** The test suite exercises 
`interrupt(Exchange)` for the nested-waiter scenario, but no test calls 
`manager.interrupt(exchange.getExchangeId())` with two threads waiting for the 
same exchange. The by-string path delegates correctly to `interrupt(Exchange)`, 
but a targeted test would prevent the delegation from being accidentally broken.
   
   **Backport:** This fixes three concurrency bugs — exchange corruption on 
late interrupt, thread-tracking loss with two waiters on the same exchange, and 
thread dropping during stop. Any Camel deployment using async processing is 
affected. The PR has the `core` label but no `port/camel-4.18.x` label. 
Consider adding one.
   
   _This review was generated by an AI agent, Hermès on behalf of @gnodet._


-- 
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