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

   Thanks for the review. Follow-up commit 7b149a4dc558.
   
   - Graceful stop delaying the hand-over: yes, that is the trade-off. A node 
keeps the leadership until its routes have stopped, which on a graceful stop 
can take up to the shutdown timeout. Handing over earlier is what allowed two 
nodes to consume at once. Lowering the shutdown timeout gets the old timing 
back, as the upgrade guide says. Happy to hear if another committer sees it 
differently.
   - Event notifier never removed: `doShutdown` now removes it when the 
CamelContext is not stopping, as you suggested. While the CamelContext stops it 
stays registered, because it is what stops the service once the routes have 
stopped. To also cover a controller replaced while the CamelContext is stopped, 
the controller now removes the notifier when the CamelContext has stopped and 
registers it again when it starts. New test 
`testControllerShutdownOnItsOwnUnregistersListeners`, and the restart test 
checks one registration per start and none after a stop.
   - Fallback for a custom `EventFactory`: added a `LifecycleStrategy` whose 
`onContextStopped` stops the cluster service if it is still started (logged and 
ignored if that fails). It is registered and removed together with the 
notifier. New test 
`testControllerClusterServiceStoppedWithoutRoutesStoppedEvent` uses an 
`EventFactory` that returns no `CamelContextRoutesStoppedEvent`. The in-flight 
and restart tests now check that the service was already stopped when the 
CamelContext finished stopping, so the notifier path stays covered and is not 
hidden by the fallback.
   - The two nits from the other review are in as well: a DEBUG log when the 
stop is deferred, and the notifier no longer sets the exchange and step ignore 
flags, which `SimpleEventNotifierSupport` already sets.
   
   camel-core cluster tests: 45 run, 0 failures. 
`ClusteredRouteControllerStopTest`: 60/60 over 10 runs in one JVM.
   
   _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