You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by NicoK <gi...@git.apache.org> on 2017/01/13 15:29:38 UTC

[GitHub] flink pull request #3120: [FLINK-5482] QueryableStateClient does not recover...

GitHub user NicoK opened a pull request:

    https://github.com/apache/flink/pull/3120

    [FLINK-5482] QueryableStateClient does not recover from a failed lookup due to a non-running job

    This PR checks each cached lookup query whether it is complete and removes any failed lookup from the cache in favour of a retry.
    
    An appropriate unit test is added based on existing test code.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NicoK/flink flink-5482

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3120.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3120
    
----
commit 086aca06674618cb3be962a883efa62c77aa1c66
Author: Nico Kruber <ni...@data-artisans.com>
Date:   2017-01-12T15:41:30Z

    [FLINK-5482] share more code in QueryableStateITCase

commit a50e155cf2a1e7e04b160d5226f16f017509799e
Author: Nico Kruber <ni...@data-artisans.com>
Date:   2017-01-12T15:48:27Z

    [FLINK-5482] fix QueryableStateClient not re-issuing a lookup upon failure
    
    Any failing lookup, e.g. in case the job has not been started yet, previously
    remained in the lookup cache and thus future queries did not retry the lookup
    and failed. This commit changes the lookup caching code so that completed
    and failed futures are removed from the cache and replaced by new lookups.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3120: [FLINK-5482] QueryableStateClient does not recover from a...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the issue:

    https://github.com/apache/flink/pull/3120
  
    Build failures are unrelated, merging this. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3120: [FLINK-5482] QueryableStateClient does not recover...

Posted by uce <gi...@git.apache.org>.
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. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3120: [FLINK-5482] QueryableStateClient does not recover...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/3120


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3120: [FLINK-5482] QueryableStateClient does not recover from a...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the issue:

    https://github.com/apache/flink/pull/3120
  
    Very good catch! Thanks. The change looks good to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---