You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/10/05 22:29:32 UTC

[GitHub] [geode] jinmeiliao opened a new pull request #5596: GEODE-8574: ClusterManagementService should not throw ClassCastExcept…

jinmeiliao opened a new pull request #5596:
URL: https://github.com/apache/geode/pull/5596


   …ion when function execution throws an Exception.
   


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



[GitHub] [geode] jinmeiliao merged pull request #5596: GEODE-8574: ClusterManagementService should not throw ClassCastExcept…

Posted by GitBox <gi...@apache.org>.
jinmeiliao merged pull request #5596:
URL: https://github.com/apache/geode/pull/5596


   


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



[GitHub] [geode] jchen21 commented on a change in pull request #5596: GEODE-8574: ClusterManagementService should not throw ClassCastExcept…

Posted by GitBox <gi...@apache.org>.
jchen21 commented on a change in pull request #5596:
URL: https://github.com/apache/geode/pull/5596#discussion_r500459409



##########
File path: geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
##########
@@ -653,7 +651,23 @@ public void close() {
         }
       }
     }
+    return results;
+  }
 
+  @VisibleForTesting
+  <R> List<R> cleanResults(List<?> functionResults) {
+    List<R> results = new ArrayList<>();
+    for (Object functionResult : functionResults) {
+      if (functionResult == null) {
+        continue;
+      }
+      if (functionResult instanceof Throwable) {
+        // log the exception and continue
+        logger.info("Error executing CacheRealizationFunction.", (Throwable) functionResult);

Review comment:
       A `warn` level maybe more appropriate than `info` level for Throwable. Some more information in the log might help the user to diagnose in case of an error. e.g. Function name etc. I would probably consider logging the stack trace.




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