flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9019) Unclosed closeableRegistry in StreamTaskStateInitializerImpl#rawOperatorStateInputs
Date Tue, 20 Mar 2018 11:20:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-9019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16406157#comment-16406157
] 

ASF GitHub Bot commented on FLINK-9019:
---------------------------------------

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

    https://github.com/apache/flink/pull/5723#discussion_r175729909
  
    --- 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 --
    
    Yes. Obviously, we could do this. Let me refactor it.


> Unclosed closeableRegistry in StreamTaskStateInitializerImpl#rawOperatorStateInputs
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-9019
>                 URL: https://issues.apache.org/jira/browse/FLINK-9019
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: vinoyang
>            Priority: Minor
>
> {code}
>      final CloseableRegistry closeableRegistry = new CloseableRegistry();
> ...
>      if (rawOperatorState != null) {
> ...
>       }
>     }
>     return CloseableIterable.empty();
> {code}
> If rawOperatorState is null, closeableRegistry would be left unclosed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message