You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/04/09 08:38:51 UTC

[GitHub] [flink] tillrohrmann opened a new pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

tillrohrmann opened a new pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683
 
 
   
   ## What is the purpose of the change
   
   In order to properly complete the termination future of an RpcEndpoint, we need to monitor
   when the underlying AkkaRpcActor has been removed from the ActorSystem. If this is not done,
   then it can happen that another RpcEndpoint using the same name cannot be started because
   the old RpcEndpoint is still registered.
   
   The way we achieve this monitoring is to introduce a helper actor which is responsible for
   starting the AkkaRpcActors for all RpcEndpoints. Since the SupervisorActor is the parent
   of all RpcEndpoints, it can tell when they are being removed from the ActorSystem through
   the SupervisorStrategy.
   
   A consequence of the new actor is that the akka urls change from akka://flink@actorsystem:port/user/xyz
   to akka://flink@actorsystem:port/user/rpc/xyz. The respective method AkkaRpcServiceUtils.getRpcUrl
   has been updated to reflect this change. This hierarchy change also warrants the bump of the
   AkkaRpcService.VERSION.
   
   The failure behaviour of the underlying ActorSystem has been changed so that it terminates
   all running actors if an exception is thrown from the SupervisorActor. The assumption is that
   such an exception always indicates a programming error and is unrecoverable.
   
   The same applies to failure originating from an AkkaRpcActor (children of the SupervisorActor).
   If such an exception is thrown, then we assume that the system is in an illegal state and shut it
   down. The way it works is by recording the failure cause for the respective AkkaRpcActor and
   then terminating the ActorSystem.
   
   ## Verifying this change
   
   - Added `AkkaActorSystemTest`, `SupervisorActorTest` and `AkkaRpcActorTest.canReuseEndpointNameAfterTermination`.
   
   ## 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, Kubernetes/Yarn/Mesos, ZooKeeper: (yes)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * 2aba0b81968e7d52b94e8ecefd9e0685abc0c46b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160388174) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529) 
   * 7be78aec965afc0f1b17ec2976583e402f765ebf UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07cde12669e52e62dd81885120fc8d4869f9d22a Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159559244) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r410180979
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/exceptions/AkkaUnknownMessageException.java
 ##########
 @@ -22,7 +22,7 @@
  * Exception which indicates that the AkkaRpcActor has received an
  * unknown message type.
  */
-public class AkkaUnknownMessageException extends AkkaRpcException {
+public class AkkaUnknownMessageException extends AkkaRpcRuntimeException {
 
 Review comment:
   I will add a more detailed commit message

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r410182490
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
 
 Review comment:
   True, I will add one. Not sure whether this all that meaningful, though.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611408618
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 07cde12669e52e62dd81885120fc8d4869f9d22a (Thu Apr 09 08:41:49 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * 2aba0b81968e7d52b94e8ecefd9e0685abc0c46b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160388174) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7660",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160723917",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * 7be78aec965afc0f1b17ec2976583e402f765ebf Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160723917) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7660) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7660",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160723917",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * 7be78aec965afc0f1b17ec2976583e402f765ebf Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160723917) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7660) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * a4765c13da15bafeee0cf54b3d1ea7b74143c802 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611519387
 
 
   Resolved the problem (hopefully) by introducing a separate `supervisor-dispatcher`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611501434
 
 
   This PR has still a problem with a potential deadlock because the `SupervisorActor` uses the same `Dispatcher` as the other actors. I'm working on a fix.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r409730898
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
+
+	@Rule
+	public final ActorSystemResource actorSystemResource = ActorSystemResource.defaultConfiguration();
+
+	@Test
+	public void completesTerminationFutureIfActorStops() {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem, actorSystem.getDispatcher());
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
 
 Review comment:
   All the implementations for the `throwableFunction` are the same in this test. Maybe there is a way to de-deduplicate this line:
   
   ```
   final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * a4765c13da15bafeee0cf54b3d1ea7b74143c802 Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355) 
   * 2aba0b81968e7d52b94e8ecefd9e0685abc0c46b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r409702076
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
 
 Review comment:
   We normally add a comment.
   
   ![image](https://user-images.githubusercontent.com/1681921/79483424-9a9d7b00-8012-11ea-8c4f-b8748a1a371a.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611964711
 
 
   @flinkbot run travis

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * a4765c13da15bafeee0cf54b3d1ea7b74143c802 Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r410180010
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/ActorSystemResource.java
 ##########
 @@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.runtime.akka.AkkaUtils;
+import org.apache.flink.util.Preconditions;
+
+import akka.actor.ActorSystem;
+import org.junit.rules.ExternalResource;
+
+/**
+ * External resource which starts an {@link akka.actor.ActorSystem}.
+ */
+public class ActorSystemResource extends ExternalResource {
+
+	private final Configuration configuration;
+
+	private ActorSystem actorSystem;
+
+	private ActorSystemResource(Configuration configuration) {
+		this.configuration = configuration;
+	}
+
+	@Override
+	protected void before() throws Throwable {
+		super.before();
+
+		Preconditions.checkState(actorSystem == null, "ActorSystem must not be initialized when calling before.");
+		actorSystem = AkkaUtils.createLocalActorSystem(configuration);
+	}
+
+	@Override
+	protected void after() {
+		Preconditions.checkState(actorSystem != null, "ActorSystem must be initialized when calling after.");
+		AkkaUtils.terminateActorSystem(actorSystem).join();
+
+		super.after();
 
 Review comment:
   Good point. I will remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r410182849
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/SupervisorActor.java
 ##########
 @@ -0,0 +1,360 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.rpc.RpcUtils;
+import org.apache.flink.runtime.rpc.akka.exceptions.AkkaRpcException;
+import org.apache.flink.runtime.rpc.akka.exceptions.AkkaUnknownMessageException;
+import org.apache.flink.util.Preconditions;
+
+import akka.AkkaException;
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.ChildRestartStats;
+import akka.actor.Props;
+import akka.actor.SupervisorStrategy;
+import akka.japi.pf.DeciderBuilder;
+import akka.pattern.Patterns;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nullable;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionException;
+import java.util.function.Function;
+
+import scala.PartialFunction;
+import scala.collection.Iterable;
+
+/**
+ * Supervisor actor which is responsible for starting {@link AkkaRpcActor} instances and monitoring
+ * when the actors have terminated.
+ */
+class SupervisorActor extends AbstractActor {
+
+	private static final Logger LOG = LoggerFactory.getLogger(SupervisorActor.class);
+
+	private final Map<ActorRef, AkkaRpcActorRegistration> registeredAkkaRpcActors;
+
+	SupervisorActor() {
+		this.registeredAkkaRpcActors = new HashMap<>();
+	}
+
+	@Override
+	public Receive createReceive() {
+		return receiveBuilder()
+			.match(StartAkkaRpcActor.class, this::createStartAkkaRpcActorMessage)
+			.matchAny(this::handleUnknownMessage)
+			.build();
+	}
+
+	@Override
+	public void postStop() throws Exception {
+		LOG.debug("Stopping supervisor actor.");
+
+		super.postStop();
+
+		for (AkkaRpcActorRegistration actorRegistration : registeredAkkaRpcActors.values()) {
+			terminateAkkaRpcActorOnStop(actorRegistration);
+		}
+
+		registeredAkkaRpcActors.clear();
+	}
+
+	@Override
+	public SupervisorActorSupervisorStrategy supervisorStrategy() {
+		return new SupervisorActorSupervisorStrategy();
+	}
+
+	private void terminateAkkaRpcActorOnStop(AkkaRpcActorRegistration akkaRpcActorRegistration) {
+		akkaRpcActorRegistration.terminateExceptionally(new AkkaRpcException(
+			String.format("Unexpected closing of %s with name %s.", getClass().getSimpleName(), akkaRpcActorRegistration.getEndpointId())));
+	}
+
+	private void createStartAkkaRpcActorMessage(StartAkkaRpcActor startAkkaRpcActor) {
+		final String endpointId = startAkkaRpcActor.getEndpointId();
+		final AkkaRpcActorRegistration akkaRpcActorRegistration = new AkkaRpcActorRegistration(endpointId);
+
+		final Props akkaRpcActorProps = startAkkaRpcActor.getPropsFactory().create(akkaRpcActorRegistration.getInternalTerminationFuture());
+
+		LOG.debug("Starting {} with name {}.", akkaRpcActorProps.actorClass().getSimpleName(), endpointId);
+
+		try {
+			final ActorRef actorRef = getContext().actorOf(akkaRpcActorProps, endpointId);
+
+			registeredAkkaRpcActors.put(actorRef, akkaRpcActorRegistration);
+
+			getSender().tell(StartAkkaRpcActorResponse.success(
+				ActorRegistration.create(
+					actorRef,
+					akkaRpcActorRegistration.getExternalTerminationFuture())),
+				getSelf());
+		} catch (AkkaException akkaException) {
+			getSender().tell(StartAkkaRpcActorResponse.failure(akkaException), getSelf());
+		}
+	}
+
+	private void akkaRpcActorTerminated(ActorRef actorRef) {
+		final AkkaRpcActorRegistration actorRegistration = removeAkkaRpcActor(actorRef);
+
+		LOG.debug("AkkaRpcActor {} has terminated.", actorRef.path());
+		actorRegistration.terminate();
+	}
+
+	private void akkaRpcActorFailed(ActorRef actorRef, Throwable cause) {
+		LOG.warn("AkkaRpcActor {} has failed. Shutting it down now.", actorRef.path(), cause);
+
+		for (Map.Entry<ActorRef, AkkaRpcActorRegistration> registeredAkkaRpcActor : registeredAkkaRpcActors.entrySet()) {
+			final ActorRef otherActorRef = registeredAkkaRpcActor.getKey();
+			if (otherActorRef.equals(actorRef)) {
+				final AkkaRpcException error = new AkkaRpcException(String.format("Stopping actor %s because it failed.", actorRef.path()), cause);
+				registeredAkkaRpcActor.getValue().markFailed(error);
+			} else {
+				final AkkaRpcException siblingException = new AkkaRpcException(String.format("Stopping actor %s because its sibling %s has failed.", otherActorRef.path(), actorRef.path()));
+				registeredAkkaRpcActor.getValue().markFailed(siblingException);
+			}
+		}
+
+		getContext().getSystem().terminate();
+	}
+
+	private AkkaRpcActorRegistration removeAkkaRpcActor(ActorRef actorRef) {
+		return Optional.ofNullable(registeredAkkaRpcActors.remove(actorRef))
+			.orElseThrow(() -> new IllegalStateException(String.format("Could not find actor %s.", actorRef.path())));
+	}
+
+	private void handleUnknownMessage(Object msg) {
+		final AkkaUnknownMessageException cause = new AkkaUnknownMessageException(String.format("Cannot handle unknown message %s.", msg));
+		getSender().tell(new akka.actor.Status.Failure(cause), getSelf());
+		throw cause;
+	}
+
+	public static String getActorName() {
+		return AkkaRpcServiceUtils.SUPERVISOR_NAME;
+	}
+
+	public static ActorRef startSupervisorActor(ActorSystem actorSystem) {
+		final Props supervisorProps = Props.create(SupervisorActor.class);
+		return actorSystem.actorOf(supervisorProps, getActorName());
+	}
+
+	public static StartAkkaRpcActorResponse startAkkaRpcActor(
+			ActorRef supervisor,
+			StartAkkaRpcActor.PropsFactory propsFactory,
+			String endpointId) {
+		return Patterns.ask(
+				supervisor,
+				createStartAkkaRpcActorMessage(
+					propsFactory,
+					endpointId),
+				RpcUtils.INF_DURATION).toCompletableFuture()
+			.thenApply(SupervisorActor.StartAkkaRpcActorResponse.class::cast)
+			.join();
+	}
+
+	public static StartAkkaRpcActor createStartAkkaRpcActorMessage(
+			StartAkkaRpcActor.PropsFactory propsFactory,
+			String endpointId) {
+		return StartAkkaRpcActor.create(propsFactory, endpointId);
+	}
+
+	// -----------------------------------------------------------------------------
+	// Internal classes
+	// -----------------------------------------------------------------------------
+
+	private final class SupervisorActorSupervisorStrategy extends SupervisorStrategy {
+
+		@Override
+		public PartialFunction<Throwable, Directive> decider() {
+			return DeciderBuilder.match(
+				Exception.class, e -> SupervisorStrategy.stop()
+			).build();
+		}
+
+		@Override
+		public boolean loggingEnabled() {
+			return false;
+		}
+
+		@Override
+		public void handleChildTerminated(akka.actor.ActorContext context, ActorRef child, Iterable<ActorRef> children) {
+			akkaRpcActorTerminated(child);
+		}
+
+		@Override
+		public void processFailure(akka.actor.ActorContext context, boolean restart, ActorRef child, Throwable cause, ChildRestartStats stats, Iterable<ChildRestartStats> children) {
+			Preconditions.checkArgument(!restart, "The supervisor strategy should never restart an actor.");
+
+			akkaRpcActorFailed(child, cause);
+		}
+	}
+
+	private static final class AkkaRpcActorRegistration {
+		private final String endpointId;
+
+		private final CompletableFuture<Void> internalTerminationFuture;
+
+		private final CompletableFuture<Void> externalTerminationFuture;
+
+		@Nullable
+		private Throwable errorCause;
+
+		private AkkaRpcActorRegistration(String endpointId) {
+			this.endpointId = endpointId;
+			internalTerminationFuture = new CompletableFuture<>();
+			externalTerminationFuture = new CompletableFuture<>();
+			errorCause = null;
+		}
+
+		private CompletableFuture<Void> getInternalTerminationFuture() {
+			return internalTerminationFuture;
+		}
+
+		private CompletableFuture<Void> getExternalTerminationFuture() {
+			return externalTerminationFuture;
+		}
+
+		private String getEndpointId() {
+			return endpointId;
+		}
+
+		private void terminate() {
+			CompletableFuture<Void> terminationFuture = internalTerminationFuture;
+
+			if (errorCause != null) {
+				if (!internalTerminationFuture.completeExceptionally(errorCause)) {
+					// we have another failure reason -> let's add it
+					terminationFuture = internalTerminationFuture.<Void>handle(
 
 Review comment:
   I will remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r410182117
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
+
+	@Rule
+	public final ActorSystemResource actorSystemResource = ActorSystemResource.defaultConfiguration();
+
+	@Test
+	public void completesTerminationFutureIfActorStops() {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		actorRegistration.getActorRef().tell(TerminateWithFutureCompletion.normal(), ActorRef.noSender());
+
+		terminationFuture.join();
+	}
+
+	@Test
+	public void completesTerminationFutureExceptionallyIfActorStopsExceptionally() throws Exception {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		final FlinkException cause = new FlinkException("Test cause.");
+		actorRegistration.getActorRef().tell(TerminateWithFutureCompletion.exceptionally(cause), ActorRef.noSender());
+
+		try {
+			terminationFuture.get();
+			fail("Expected the termination future being completed exceptionally");
+		} catch (ExecutionException expected) {
+			final Throwable ignored = ExceptionUtils.findThrowable(expected, e -> e.equals(cause))
+				.orElseThrow(() -> new FlinkException("Unexpected exception", expected));
+		}
+	}
+
+	@Test
+	public void completesTerminationFutureExceptionallyIfActorStopsWithoutReason() throws InterruptedException {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		actorRegistration.getActorRef().tell(Terminate.INSTANCE, ActorRef.noSender());
+
+		try {
+			terminationFuture.get();
+			fail("Expected the termination future being completed exceptionally");
+		} catch (ExecutionException expected) {}
+	}
+
+	@Test
+	public void completesTerminationFutureExceptionallyIfActorFails() throws Exception {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		final CompletableFuture<Terminated> actorSystemTerminationFuture = actorSystem.getWhenTerminated().toCompletableFuture();
+
+		final FlinkException cause = new FlinkException("Test cause.");
+		actorRegistration.getActorRef().tell(Fail.exceptionally(cause), ActorRef.noSender());
+
+		try {
+			terminationFuture.get();
+			fail("Expected the termination future being completed exceptionally");
+		} catch (ExecutionException expected) {
+			final Throwable ignored = ExceptionUtils.findThrowable(expected, e -> e.equals(cause))
 
 Review comment:
   There is no reason other than stupidity.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r409730898
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
+
+	@Rule
+	public final ActorSystemResource actorSystemResource = ActorSystemResource.defaultConfiguration();
+
+	@Test
+	public void completesTerminationFutureIfActorStops() {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem, actorSystem.getDispatcher());
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
 
 Review comment:
   All the implementations for the `throwableFunction` are the same. Maybe there is a way to de-deduplicate this line:
   
   ```
   final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r408668235
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/ActorSystemResource.java
 ##########
 @@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.runtime.akka.AkkaUtils;
+import org.apache.flink.util.Preconditions;
+
+import akka.actor.ActorSystem;
+import org.junit.rules.ExternalResource;
+
+/**
+ * External resource which starts an {@link akka.actor.ActorSystem}.
+ */
+public class ActorSystemResource extends ExternalResource {
+
+	private final Configuration configuration;
+
+	private ActorSystem actorSystem;
+
+	private ActorSystemResource(Configuration configuration) {
+		this.configuration = configuration;
+	}
+
+	@Override
+	protected void before() throws Throwable {
+		super.before();
+
+		Preconditions.checkState(actorSystem == null, "ActorSystem must not be initialized when calling before.");
+		actorSystem = AkkaUtils.createLocalActorSystem(configuration);
+	}
+
+	@Override
+	protected void after() {
+		Preconditions.checkState(actorSystem != null, "ActorSystem must be initialized when calling after.");
+		AkkaUtils.terminateActorSystem(actorSystem).join();
+
+		super.after();
 
 Review comment:
   Not needed to call `super.before()` and `super.after()`. Also not done in their own code (e.g., `TemporaryFolder`) and in the examples in Junit's Javadocs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-615214534
 
 
   Thanks for the review @GJL. I've addressed your comments (which unfortunately required a force push).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * 2aba0b81968e7d52b94e8ecefd9e0685abc0c46b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160388174) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611964748
 
 
   @flinkbot run azure

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r409706733
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/SupervisorActor.java
 ##########
 @@ -0,0 +1,360 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.rpc.RpcUtils;
+import org.apache.flink.runtime.rpc.akka.exceptions.AkkaRpcException;
+import org.apache.flink.runtime.rpc.akka.exceptions.AkkaUnknownMessageException;
+import org.apache.flink.util.Preconditions;
+
+import akka.AkkaException;
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.ChildRestartStats;
+import akka.actor.Props;
+import akka.actor.SupervisorStrategy;
+import akka.japi.pf.DeciderBuilder;
+import akka.pattern.Patterns;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nullable;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionException;
+import java.util.function.Function;
+
+import scala.PartialFunction;
+import scala.collection.Iterable;
+
+/**
+ * Supervisor actor which is responsible for starting {@link AkkaRpcActor} instances and monitoring
+ * when the actors have terminated.
+ */
+class SupervisorActor extends AbstractActor {
+
+	private static final Logger LOG = LoggerFactory.getLogger(SupervisorActor.class);
+
+	private final Map<ActorRef, AkkaRpcActorRegistration> registeredAkkaRpcActors;
+
+	SupervisorActor() {
+		this.registeredAkkaRpcActors = new HashMap<>();
+	}
+
+	@Override
+	public Receive createReceive() {
+		return receiveBuilder()
+			.match(StartAkkaRpcActor.class, this::createStartAkkaRpcActorMessage)
+			.matchAny(this::handleUnknownMessage)
+			.build();
+	}
+
+	@Override
+	public void postStop() throws Exception {
+		LOG.debug("Stopping supervisor actor.");
+
+		super.postStop();
+
+		for (AkkaRpcActorRegistration actorRegistration : registeredAkkaRpcActors.values()) {
+			terminateAkkaRpcActorOnStop(actorRegistration);
+		}
+
+		registeredAkkaRpcActors.clear();
+	}
+
+	@Override
+	public SupervisorActorSupervisorStrategy supervisorStrategy() {
+		return new SupervisorActorSupervisorStrategy();
+	}
+
+	private void terminateAkkaRpcActorOnStop(AkkaRpcActorRegistration akkaRpcActorRegistration) {
+		akkaRpcActorRegistration.terminateExceptionally(new AkkaRpcException(
+			String.format("Unexpected closing of %s with name %s.", getClass().getSimpleName(), akkaRpcActorRegistration.getEndpointId())));
+	}
+
+	private void createStartAkkaRpcActorMessage(StartAkkaRpcActor startAkkaRpcActor) {
+		final String endpointId = startAkkaRpcActor.getEndpointId();
+		final AkkaRpcActorRegistration akkaRpcActorRegistration = new AkkaRpcActorRegistration(endpointId);
+
+		final Props akkaRpcActorProps = startAkkaRpcActor.getPropsFactory().create(akkaRpcActorRegistration.getInternalTerminationFuture());
+
+		LOG.debug("Starting {} with name {}.", akkaRpcActorProps.actorClass().getSimpleName(), endpointId);
+
+		try {
+			final ActorRef actorRef = getContext().actorOf(akkaRpcActorProps, endpointId);
+
+			registeredAkkaRpcActors.put(actorRef, akkaRpcActorRegistration);
+
+			getSender().tell(StartAkkaRpcActorResponse.success(
+				ActorRegistration.create(
+					actorRef,
+					akkaRpcActorRegistration.getExternalTerminationFuture())),
+				getSelf());
+		} catch (AkkaException akkaException) {
+			getSender().tell(StartAkkaRpcActorResponse.failure(akkaException), getSelf());
+		}
+	}
+
+	private void akkaRpcActorTerminated(ActorRef actorRef) {
+		final AkkaRpcActorRegistration actorRegistration = removeAkkaRpcActor(actorRef);
+
+		LOG.debug("AkkaRpcActor {} has terminated.", actorRef.path());
+		actorRegistration.terminate();
+	}
+
+	private void akkaRpcActorFailed(ActorRef actorRef, Throwable cause) {
+		LOG.warn("AkkaRpcActor {} has failed. Shutting it down now.", actorRef.path(), cause);
+
+		for (Map.Entry<ActorRef, AkkaRpcActorRegistration> registeredAkkaRpcActor : registeredAkkaRpcActors.entrySet()) {
+			final ActorRef otherActorRef = registeredAkkaRpcActor.getKey();
+			if (otherActorRef.equals(actorRef)) {
+				final AkkaRpcException error = new AkkaRpcException(String.format("Stopping actor %s because it failed.", actorRef.path()), cause);
+				registeredAkkaRpcActor.getValue().markFailed(error);
+			} else {
+				final AkkaRpcException siblingException = new AkkaRpcException(String.format("Stopping actor %s because its sibling %s has failed.", otherActorRef.path(), actorRef.path()));
+				registeredAkkaRpcActor.getValue().markFailed(siblingException);
+			}
+		}
+
+		getContext().getSystem().terminate();
+	}
+
+	private AkkaRpcActorRegistration removeAkkaRpcActor(ActorRef actorRef) {
+		return Optional.ofNullable(registeredAkkaRpcActors.remove(actorRef))
+			.orElseThrow(() -> new IllegalStateException(String.format("Could not find actor %s.", actorRef.path())));
+	}
+
+	private void handleUnknownMessage(Object msg) {
+		final AkkaUnknownMessageException cause = new AkkaUnknownMessageException(String.format("Cannot handle unknown message %s.", msg));
+		getSender().tell(new akka.actor.Status.Failure(cause), getSelf());
+		throw cause;
+	}
+
+	public static String getActorName() {
+		return AkkaRpcServiceUtils.SUPERVISOR_NAME;
+	}
+
+	public static ActorRef startSupervisorActor(ActorSystem actorSystem) {
+		final Props supervisorProps = Props.create(SupervisorActor.class);
+		return actorSystem.actorOf(supervisorProps, getActorName());
+	}
+
+	public static StartAkkaRpcActorResponse startAkkaRpcActor(
+			ActorRef supervisor,
+			StartAkkaRpcActor.PropsFactory propsFactory,
+			String endpointId) {
+		return Patterns.ask(
+				supervisor,
+				createStartAkkaRpcActorMessage(
+					propsFactory,
+					endpointId),
+				RpcUtils.INF_DURATION).toCompletableFuture()
+			.thenApply(SupervisorActor.StartAkkaRpcActorResponse.class::cast)
+			.join();
+	}
+
+	public static StartAkkaRpcActor createStartAkkaRpcActorMessage(
+			StartAkkaRpcActor.PropsFactory propsFactory,
+			String endpointId) {
+		return StartAkkaRpcActor.create(propsFactory, endpointId);
+	}
+
+	// -----------------------------------------------------------------------------
+	// Internal classes
+	// -----------------------------------------------------------------------------
+
+	private final class SupervisorActorSupervisorStrategy extends SupervisorStrategy {
+
+		@Override
+		public PartialFunction<Throwable, Directive> decider() {
+			return DeciderBuilder.match(
+				Exception.class, e -> SupervisorStrategy.stop()
+			).build();
+		}
+
+		@Override
+		public boolean loggingEnabled() {
+			return false;
+		}
+
+		@Override
+		public void handleChildTerminated(akka.actor.ActorContext context, ActorRef child, Iterable<ActorRef> children) {
+			akkaRpcActorTerminated(child);
+		}
+
+		@Override
+		public void processFailure(akka.actor.ActorContext context, boolean restart, ActorRef child, Throwable cause, ChildRestartStats stats, Iterable<ChildRestartStats> children) {
+			Preconditions.checkArgument(!restart, "The supervisor strategy should never restart an actor.");
+
+			akkaRpcActorFailed(child, cause);
+		}
+	}
+
+	private static final class AkkaRpcActorRegistration {
+		private final String endpointId;
+
+		private final CompletableFuture<Void> internalTerminationFuture;
+
+		private final CompletableFuture<Void> externalTerminationFuture;
+
+		@Nullable
+		private Throwable errorCause;
+
+		private AkkaRpcActorRegistration(String endpointId) {
+			this.endpointId = endpointId;
+			internalTerminationFuture = new CompletableFuture<>();
+			externalTerminationFuture = new CompletableFuture<>();
+			errorCause = null;
+		}
+
+		private CompletableFuture<Void> getInternalTerminationFuture() {
+			return internalTerminationFuture;
+		}
+
+		private CompletableFuture<Void> getExternalTerminationFuture() {
+			return externalTerminationFuture;
+		}
+
+		private String getEndpointId() {
+			return endpointId;
+		}
+
+		private void terminate() {
+			CompletableFuture<Void> terminationFuture = internalTerminationFuture;
+
+			if (errorCause != null) {
+				if (!internalTerminationFuture.completeExceptionally(errorCause)) {
+					// we have another failure reason -> let's add it
+					terminationFuture = internalTerminationFuture.<Void>handle(
 
 Review comment:
   I think `<Void>` can be inferred by the compiler:
   ```suggestion
   					terminationFuture = internalTerminationFuture.handle(
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-614792572
 
 
   Looks good all in all.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07cde12669e52e62dd81885120fc8d4869f9d22a Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159559244) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273) 
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/159605154) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * a4765c13da15bafeee0cf54b3d1ea7b74143c802 Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * a4765c13da15bafeee0cf54b3d1ea7b74143c802 Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355) 
   * 2aba0b81968e7d52b94e8ecefd9e0685abc0c46b Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160388174) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r408832657
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/exceptions/AkkaUnknownMessageException.java
 ##########
 @@ -22,7 +22,7 @@
  * Exception which indicates that the AkkaRpcActor has received an
  * unknown message type.
  */
-public class AkkaUnknownMessageException extends AkkaRpcException {
+public class AkkaUnknownMessageException extends AkkaRpcRuntimeException {
 
 Review comment:
   I think the commit message should better reflect why this change was done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r409701035
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
+
+	@Rule
+	public final ActorSystemResource actorSystemResource = ActorSystemResource.defaultConfiguration();
+
+	@Test
+	public void completesTerminationFutureIfActorStops() {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		actorRegistration.getActorRef().tell(TerminateWithFutureCompletion.normal(), ActorRef.noSender());
+
+		terminationFuture.join();
+	}
+
+	@Test
+	public void completesTerminationFutureExceptionallyIfActorStopsExceptionally() throws Exception {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		final FlinkException cause = new FlinkException("Test cause.");
+		actorRegistration.getActorRef().tell(TerminateWithFutureCompletion.exceptionally(cause), ActorRef.noSender());
+
+		try {
+			terminationFuture.get();
+			fail("Expected the termination future being completed exceptionally");
+		} catch (ExecutionException expected) {
+			final Throwable ignored = ExceptionUtils.findThrowable(expected, e -> e.equals(cause))
+				.orElseThrow(() -> new FlinkException("Unexpected exception", expected));
+		}
+	}
+
+	@Test
+	public void completesTerminationFutureExceptionallyIfActorStopsWithoutReason() throws InterruptedException {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		actorRegistration.getActorRef().tell(Terminate.INSTANCE, ActorRef.noSender());
+
+		try {
+			terminationFuture.get();
+			fail("Expected the termination future being completed exceptionally");
+		} catch (ExecutionException expected) {}
+	}
+
+	@Test
+	public void completesTerminationFutureExceptionallyIfActorFails() throws Exception {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem);
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
+
+		final CompletableFuture<Void> terminationFuture = actorRegistration.getTerminationFuture();
+		assertThat(terminationFuture.isDone(), is(false));
+
+		final CompletableFuture<Terminated> actorSystemTerminationFuture = actorSystem.getWhenTerminated().toCompletableFuture();
+
+		final FlinkException cause = new FlinkException("Test cause.");
+		actorRegistration.getActorRef().tell(Fail.exceptionally(cause), ActorRef.noSender());
+
+		try {
+			terminationFuture.get();
+			fail("Expected the termination future being completed exceptionally");
+		} catch (ExecutionException expected) {
+			final Throwable ignored = ExceptionUtils.findThrowable(expected, e -> e.equals(cause))
 
 Review comment:
   Why assign the throwable to `ignored` in the first place? Also in `completesTerminationFutureExceptionallyIfActorStopsExceptionally()`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07cde12669e52e62dd81885120fc8d4869f9d22a UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#discussion_r410183746
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/SupervisorActorTest.java
 ##########
 @@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.rpc.akka;
+
+import org.apache.flink.util.ExceptionUtils;
+import org.apache.flink.util.FlinkException;
+import org.apache.flink.util.TestLogger;
+
+import akka.actor.AbstractActor;
+import akka.actor.ActorRef;
+import akka.actor.ActorSystem;
+import akka.actor.Props;
+import akka.actor.Terminated;
+import akka.japi.pf.ReceiveBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.annotation.Nullable;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class SupervisorActorTest extends TestLogger {
+
+	@Rule
+	public final ActorSystemResource actorSystemResource = ActorSystemResource.defaultConfiguration();
+
+	@Test
+	public void completesTerminationFutureIfActorStops() {
+		final ActorSystem actorSystem = actorSystemResource.getActorSystem();
+
+		final ActorRef supervisor = SupervisorActor.startSupervisorActor(actorSystem, actorSystem.getDispatcher());
+
+		final SupervisorActor.StartAkkaRpcActorResponse startResponse = SupervisorActor.startAkkaRpcActor(
+			supervisor,
+			terminationFuture -> Props.create(SimpleActor.class, terminationFuture),
+			"foobar");
+
+		final SupervisorActor.ActorRegistration actorRegistration = startResponse.orElseThrow(cause -> new AssertionError("Expected the start to succeed.", cause));
 
 Review comment:
   Good point. I'll look into it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07cde12669e52e62dd81885120fc8d4869f9d22a Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/159559244) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07cde12669e52e62dd81885120fc8d4869f9d22a Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/159559244) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fade42d50aa4a6937b44e1b42919220eb5ec431b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159605154",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7288",
       "triggerID" : "611964711",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7355",
       "triggerID" : "a4765c13da15bafeee0cf54b3d1ea7b74143c802",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160388174",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529",
       "triggerID" : "2aba0b81968e7d52b94e8ecefd9e0685abc0c46b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7660",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160723917",
       "triggerID" : "7be78aec965afc0f1b17ec2976583e402f765ebf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fade42d50aa4a6937b44e1b42919220eb5ec431b UNKNOWN
   * 2aba0b81968e7d52b94e8ecefd9e0685abc0c46b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160388174) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7529) 
   * 7be78aec965afc0f1b17ec2976583e402f765ebf Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160723917) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7660) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors
URL: https://github.com/apache/flink/pull/11683#issuecomment-611422123
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159559244",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273",
       "triggerID" : "07cde12669e52e62dd81885120fc8d4869f9d22a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07cde12669e52e62dd81885120fc8d4869f9d22a Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/159559244) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7273) 
   * 7d5dce14073ede4ca9ff0cebd4c92acd70c5ef61 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services