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

   Thanks Claus. Done in 4ad2a206: the stale attempt now only stops its 
consumer (`ServiceHelper.stopService`), and the processor restart is kept.
   
   I also took the optional point. A late start in the same lifecycle publishes 
its consumer and cancels the newer task, which cannot have run yet, as the 
leadership pool has one thread (and if the cancel ever lost the race, the newer 
task finds `delegatedConsumer` set and stops its own consumer). An attempt from 
before a stop and start of the same instance is recognised by the pool it runs 
on and still stops its consumer.
   
   On the `threads()` example: with today's `Pipeline.doShutdown` it did not 
reproduce on the PR head. The route's steps are wrapped in a `RoutePipeline`, 
and `Pipeline.doShutdown` passes its processor list as one varargs element, so 
each step is only stopped, never shut down, and `ThreadsProcessor.doShutdown` 
is not reached. Using `stopService` no longer depends on that. The tests now 
cover a take, lose and take during a slow start with a `threads()` route (one 
consumer, the route keeps routing), and the restart test uses `threads()` and 
checks that the stale consumer is not shut down.
   


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