RocMarshal commented on code in PR #22845:
URL: https://github.com/apache/flink/pull/22845#discussion_r1242033699


##########
flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinator.java:
##########
@@ -270,8 +269,9 @@ public void start() throws Exception {
     @Override
     public void close() throws Exception {
         LOG.info("Closing SourceCoordinator for source {}.", operatorName);
+        closeQuietly(context);
         if (started) {
-            closeAll(asList(context, enumerator), Throwable.class);
+            closeQuietly(enumerator);

Review Comment:
   Could we force constraints on the order of closing `context` and 
`enumerator` as follows:
   Because `context` was used by  `enumerator`, This is a bit like the close 
order in the I/O mechanism.
   
   ```
           if (started) {
               closeQuietly(enumerator);
           }
           closeQuietly(context);
   ```
   
   Although not doing so will not result in semantic errors.



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