cshannon commented on PR #2206:
URL: https://github.com/apache/activemq/pull/2206#issuecomment-4927218397

   I think this is the wrong approach to the fix because we are trying to clean 
up something that shouldn't happen and should be fatal. Generally Errors like 
OOM should be considered fatal and we should be just terminating the JVM. If we 
don't handle it and re-throw it the broker is going to be in a really bad state 
so continuing to try and run after OOM doesn't make sense to me.
   
   The SchedulerTimerTask already catches Errors, but then simply logs and 
rethrows them which is odd. My question is do we really _want_ to keep trying 
to run if there was OOM? Probably not. 
   
   I don't see a good reason to continue running if we get an Error, so I feel 
like we could just default to exiting the JVM on errors like this: 
https://github.com/cshannon/activemq/commit/bfcd1c084f0f8b93e0a37eef4d6fd0e0957fc853
   
   We could narrow the scope to VirtualMachineError but generally any thrown 
Error is probably very bad and we should treat it as fatal.
   
   Thoughts @mattrpav and @jbonofre ?
   


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