You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2022/03/16 18:34:21 UTC

[GitHub] [samza] bringhurst commented on a change in pull request #1590: SAMZA-2729: samza-rest: Crash on uncaught exceptions in monitor threads

bringhurst commented on a change in pull request #1590:
URL: https://github.com/apache/samza/pull/1590#discussion_r828296367



##########
File path: samza-rest/src/main/java/org/apache/samza/rest/SamzaRestService.java
##########
@@ -83,6 +84,7 @@ public SamzaRestService(Server server,
    */
   public static void main(String[] args)
       throws Exception {
+    Thread.setDefaultUncaughtExceptionHandler(UncaughtExceptionHandlers.systemExit());

Review comment:
       Yes. This would make it crash on uncaught exceptions in threads.
   
   In our case, we have a process which will detect the crash and restart it automatically.
   
   Each crash should be considered a bug that needs to be fixed. The idea is to crash the process rather than leave it running in a bad state (e.g. leaked resources).




-- 
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: commits-unsubscribe@samza.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org