You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/10/22 11:42:42 UTC
[GitHub] flink pull request #4880: [FLINK-7898] [flip6] Don't propagate CancellationE...
GitHub user tillrohrmann opened a pull request:
https://github.com/apache/flink/pull/4880
[FLINK-7898] [flip6] Don't propagate CancellationExceptions in RegisteredRpcConnection
## What is the purpose of the change
The RegisteredRpcConnection should not call the exception handler when the RetryingRegistration future failed with a cancellation exception, because this is how the future is completed in case of stopping the RetryingRegistration.
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tillrohrmann/flink fixTaskExecutorTest
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4880.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 #4880
----
commit d7c6f4a56eb5d1c7ac3d4ee1b02e37697ca0022a
Author: Till Rohrmann <tr...@apache.org>
Date: 2017-10-22T11:38:50Z
[FLINK-7898] [flip6] Don't propagate CancellationExceptions in RegisteredRpcConnection
The RegisteredRpcConnection should not call the exception handler when the RetryingRegistration future
failed with a cancellation exception, because this is how the future is completed in case of stopping
the RetryingRegistration.
----
---
[GitHub] flink pull request #4880: [FLINK-7898] [flip6] Don't propagate CancellationE...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/4880#discussion_r146140859
--- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/registration/RegisteredRpcConnection.java ---
@@ -91,9 +92,15 @@ public void start() {
future.whenCompleteAsync(
(Tuple2<G, S> result, Throwable failure) -> {
- // this future should only ever fail if there is a bug, not if the registration is declined
if (failure != null) {
- onRegistrationFailure(failure);
+ if (failure instanceof CancellationException) {
+ // we ignore cancellation exceptions because the originate from cancelling
--- End diff --
the -> they
---
[GitHub] flink pull request #4880: [FLINK-7898] [flip6] Don't propagate CancellationE...
Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann closed the pull request at:
https://github.com/apache/flink/pull/4880
---
[GitHub] flink issue #4880: [FLINK-7898] [flip6] Don't propagate CancellationExceptio...
Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:
https://github.com/apache/flink/pull/4880
Thanks for your review @zentol. Merging this PR.
---
[GitHub] flink pull request #4880: [FLINK-7898] [flip6] Don't propagate CancellationE...
Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4880#discussion_r146173238
--- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/registration/RegisteredRpcConnection.java ---
@@ -91,9 +92,15 @@ public void start() {
future.whenCompleteAsync(
(Tuple2<G, S> result, Throwable failure) -> {
- // this future should only ever fail if there is a bug, not if the registration is declined
if (failure != null) {
- onRegistrationFailure(failure);
+ if (failure instanceof CancellationException) {
+ // we ignore cancellation exceptions because the originate from cancelling
--- End diff --
Thanks for spotting the error. Will fix it.
---