allthingssecurity commented on PR #30309:
URL: https://github.com/apache/camel/pull/30309#issuecomment-6972899311

   On old exchanges in the new route's count: yes, that is chosen on purpose. 
An exchange of the removed route that never ends keeps `size(routeId)` at 1 or 
more after the re-add, so the next graceful stop of that route waits up to its 
shutdown timeout and then forces, as it would for any exchange still running. 
That exchange is still running and still counted in the global `size()` (the 
forced stop never removes it), so the route count now agrees with it. On main 
its later decrement takes the new route to -1, and from then on 
`DefaultShutdownStrategy` (around :706) sees one exchange fewer than are really 
in flight, so a graceful stop can skip waiting for a real exchange of the new 
route. I think waiting is the safer side too.
   
   I will push a follow-up that says this in the comment in `addRoute` 
(DefaultInflightRepository.java:94-103): a never-ending exchange of the removed 
route keeps the count of the re-added route at 1 or more, which makes later 
graceful stops wait for their timeout and shows in the route-scoped throttling 
policy and the JMX gauges, and that this is preferred over a negative count. 
Thanks.
   
   _Claude Code on behalf of allthingssecurity_
   


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