vy commented on pull request #452:
URL: https://github.com/apache/logging-log4j2/pull/452#issuecomment-752257307


   > The downside is when an error is raised, we pay the full cost of thread 
creation and context switching rather than catching and continuing.
   
   Correct. Though note that this is not worsening the situation compared to 
2.13.0 and earlier. Up until 2.13.0, we were catching `RuntimeException` and 
`Exception`s. In 2.14.0, we have replaced these two catch blocks with a single 
`Throwable` catch. Then the hell broke loose.
   
   > Can we compare this solution with a potential alternative:
   > The `AppenderControl` is reverted to catch `Exception`, not 
`Throwable`/`Error`, however `AsyncAppender.AsyncThread.run()` is updated to 
catch `Throwable` in both `callAppenders` and the `errorAppender.callAppender` 
try/catch?
   
   How are we gonna handle `ThreadDeath` in this case?
   
   In summary, I am really reluctant to add any kind of `catch (Throwable ...)` 
clauses.
   
   > I believe this would match how the disruptor-based `AsyncContextSelector` 
implementation works already.
   
   Any code pointers?


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to