jbonofre opened a new pull request, #2554:
URL: https://github.com/apache/activemq/pull/2554

   ## Summary
   
   - Fixes #2552: a broker started via `./activemq start` with 
`startAsync=true`, running as a slave, disappeared after roughly 10 minutes 
with nothing logged.
   - `BrokerService.DEFAULT_START_TIMEOUT` is 10 minutes, and `StartCommand` 
called `broker.waitUntilStarted()` with that timeout, throwing (and exiting the 
process) whenever it returned `false`. Before `startAsync` existed this was 
harmless, since `start()` itself blocked until the broker became master. With 
`startAsync=true`, `start()` returns immediately, and a slave can legitimately 
wait on the lock far longer than 10 minutes.
   - `StartCommand` now loops on `waitUntilStarted()`, only throwing/exiting 
once `broker.getStartException()` is actually non-null. This can't spin 
indefinitely: `BrokerService.stop()` always records a start exception 
(`BrokerStoppedException`) before it ever marks the broker as stopped, so a 
real stop or startup failure still surfaces immediately.
   
   ## Test plan
   
   - [x] `mvn -pl activemq-console -am compile` succeeds
   - [ ] Manual verification: start a slave broker with `startAsync=true` and 
confirm the process stays alive past 10 minutes while waiting on the lock, and 
exits promptly with a logged error on an actual startup failure
   
   Fixes #2552


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to