You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by GitBox <gi...@apache.org> on 2020/08/31 13:08:50 UTC

[GitHub] [unomi] liatiusim commented on a change in pull request #186: Stop unomi when reactor error

liatiusim commented on a change in pull request #186:
URL: https://github.com/apache/unomi/pull/186#discussion_r480117924



##########
File path: persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
##########
@@ -2081,13 +2081,25 @@ public T executeInClassLoader(Object... args) throws Exception {
         public T catchingExecuteInClassLoader(boolean logError, Object... args) {
             try {
                 return executeInClassLoader(timerName, args);
-            } catch (Throwable t) {
-                if (logError) {
-                    logger.error("Error while executing in class loader", t);
+            } catch (IllegalStateException e) {
+                // Reactor stopped - recovery is not possible
+                if (e.getMessage().contains("I/O reactor status: STOPPED")) {
+                    logger.error("I/O Reactor stopped - stopping application");
+                    System.exit(-1);

Review comment:
       Thank you for the code review. I'll fix that soon




----------------------------------------------------------------
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:
users@infra.apache.org