curcur commented on a change in pull request #12525:
URL: https://github.com/apache/flink/pull/12525#discussion_r439255769



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -613,25 +614,31 @@ protected void cleanUpInvoke() throws Exception {
                // stop all timers and threads
                tryShutdownTimerService();
 
+               Throwable suppressedThrowable = null;
                // stop all asynchronous checkpoint threads
                try {
                        cancelables.close();
                        shutdownAsyncThreads();
                } catch (Throwable t) {
-                       // catch and log the exception to not replace the 
original exception
-                       LOG.error("Could not shut down async checkpoint 
threads", t);
+                       // catch and suppress the exception to not replace the 
original exception
+                       suppressedThrowable = 
ExceptionUtils.firstOrSuppressed(t, suppressedThrowable);
                }
 
                // we must! perform this cleanup
                try {
                        cleanup();
                } catch (Throwable t) {
-                       // catch and log the exception to not replace the 
original exception
-                       LOG.error("Error during cleanup of stream task", t);
+                       // catch and suppress the exception to not replace the 
original exception
+                       suppressedThrowable = 
ExceptionUtils.firstOrSuppressed(t, suppressedThrowable);
                }
 
                // if the operators were not disposed before, do a hard dispose
-               disposeAllOperators(true);
+               try {
+                       disposeAllOperators(true);

Review comment:
       As I said, the behavior is different.
   
   I am not sure this should belong to this fix....




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