tillrohrmann commented on a change in pull request #9268: [FLINK-13452] Ensure 
to fail global when exception happens during reseting tasks of regions
URL: https://github.com/apache/flink/pull/9268#discussion_r309187935
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/AdaptedRestartPipelinedRegionStrategyNG.java
 ##########
 @@ -148,19 +145,10 @@ private RestartCallback 
createResetAndRescheduleTasksCallback(final long globalM
                        } catch (GlobalModVersionMismatch e) {
                                throw new IllegalStateException(
                                        "Bug: ExecutionGraph was concurrently 
modified outside of main thread", e);
-                       } catch (Exception e) {
-                               throw new CompletionException(e);
-                       }
-               };
-       }
-
-       private BiFunction<Object, Throwable, Object> failGlobalOnError() {
-               return (Object ignored, Throwable t) -> {
-                       if (t != null) {
+                       } catch (Throwable t) {
                                LOG.info("Unexpected error happens in region 
failover. Fail globally.", t);
                                failGlobal(t);
 
 Review comment:
   I think it is better to let the exception handling happen where it has been. 
Usually it is a good idea to do the exception handling at the highest possible 
level.

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


With regards,
Apache Git Services

Reply via email to