dawidwys commented on a change in pull request #18745:
URL: https://github.com/apache/flink/pull/18745#discussion_r809035444



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinatorContext.java
##########
@@ -259,9 +265,9 @@ public void runInCoordinatorThread(Runnable runnable) {
     @Override
     public void close() throws InterruptedException {
         closed = true;
-        notifier.close();
-        coordinatorExecutor.shutdown();
-        coordinatorExecutor.awaitTermination(Long.MAX_VALUE, 
TimeUnit.MILLISECONDS);
+        // Close quietly so the closing sequence will be executed completely.
+        closeQuietly(notifier);

Review comment:
       By default we "suppress" all exceptions, because the default 
`suppressedException` is `Exception.class` and we suppress all exception that 
can be assigned to `Exception`.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinatorContext.java
##########
@@ -259,9 +265,9 @@ public void runInCoordinatorThread(Runnable runnable) {
     @Override
     public void close() throws InterruptedException {
         closed = true;
-        notifier.close();
-        coordinatorExecutor.shutdown();
-        coordinatorExecutor.awaitTermination(Long.MAX_VALUE, 
TimeUnit.MILLISECONDS);
+        // Close quietly so the closing sequence will be executed completely.
+        closeQuietly(notifier);

Review comment:
       By default we "suppress" all exceptions, because the default 
`suppressedException` is `Exception.class` and we suppress all exceptions that 
can be assigned to `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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to