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

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

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

    https://github.com/apache/flink/pull/3120#discussion_r96232469
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateClient.java
 ---
    @@ -341,7 +341,34 @@ public void shutDown() {
                                        return previous;
                                }
                        } else {
    -                           return cachedFuture;
    +                           // do not retain futures which failed as they 
will remain in
    +                           // the cache even if the error cause is not 
present any more
    +                           // and a new lookup may succeed
    +                           boolean isFailedFuture = false;
    +                           if (cachedFuture.isCompleted()) {
    +                                   // find out if the future failed
    +                                   try {
    +                                           
cachedFuture.value().get().get();
    --- End diff --
    
    I think you can do `cachedFuture.value().get().isFailure()` instead of 
catching the Exception here. 


> QueryableStateClient does not recover from a failed lookup due to a 
> non-running job
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-5482
>                 URL: https://issues.apache.org/jira/browse/FLINK-5482
>             Project: Flink
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>
> When the QueryableStateClient is used to issue a query but the job is not 
> running yet, its internal lookup result is cached with an 
> IllegalStateException that the job was not found. It does, however, never 
> recover from that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to