Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5239#discussion_r160135285
  
    --- Diff: 
flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
 ---
    @@ -831,11 +834,12 @@ private StreamStateHandle materializeStateData(Path 
filePath) throws Exception {
                                return result;
     
                        } finally {
    -                           if (inputStream != null && 
closeableRegistry.unregisterCloseable(inputStream)) {
    +
    +                           if 
(closeableRegistry.unregisterCloseable(inputStream)) {
                                        inputStream.close();
                                }
     
    -                           if (outputStream != null && 
closeableRegistry.unregisterCloseable(outputStream)) {
    +                           if 
(closeableRegistry.unregisterCloseable(outputStream)) {
    --- End diff --
    
    Maybe instead of commenting this, we could rename `closeableRegistry` to 
`ongoingIoInteruptRegistry` or `ongoingIoCancellingRegistry`


---

Reply via email to