sjwiesman commented on a change in pull request #11335: 
[FLINK-16313][state-processor-api] Properly dispose of native resources when 
closing input split
URL: https://github.com/apache/flink/pull/11335#discussion_r388999026
 
 

 ##########
 File path: 
flink-libraries/flink-state-processing-api/src/main/java/org/apache/flink/state/api/input/operator/StateReaderOperator.java
 ##########
 @@ -104,7 +104,21 @@ public void open() throws Exception {
        }
 
        public void close() throws Exception {
-               FunctionUtils.closeFunction(function);
+               Exception exception = null;
+
+               try {
+                       FunctionUtils.closeFunction(function);
+               } catch (Exception e) {
+                       // The state backend must always be closed
+                       // to release native resources.
+                       exception = e;
+               }
+
+               keyedStateBackend.dispose();
 
 Review comment:
   -1 `keyedStateBackend.dispose()` throws and exception and checkstyle did not 
like calling a method that throws inside of a `finally` block. 

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