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

    https://github.com/apache/flink/pull/5723#discussion_r175705138
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamTaskStateInitializerImpl.java
 ---
    @@ -279,15 +279,14 @@ protected OperatorStateBackend operatorStateBackend(
     
                if (restoreStateAlternatives.hasNext()) {
     
    -                   final CloseableRegistry closeableRegistry = new 
CloseableRegistry();
    -
                        Collection<OperatorStateHandle> rawOperatorState = 
restoreStateAlternatives.next();
                        // TODO currently this does not support local state 
recovery, so we expect there is only one handle.
                        Preconditions.checkState(
                                !restoreStateAlternatives.hasNext(),
                                "Local recovery is currently not implemented 
for raw operator state, but found state alternative.");
     
                        if (rawOperatorState != null) {
    +                           final CloseableRegistry closeableRegistry = new 
CloseableRegistry();
    --- End diff --
    
    Can't we even move this registry into the anonymous class?


---

Reply via email to