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

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

GitHub user tillrohrmann opened a pull request:

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

    [FLINK-7754] [rpc] Complete termination future after actor has been stopped

    ## What is the purpose of the change
    
    This commit waits not only until the Actor has called postStop but also 
until the actor
    has been completely shut down by the ActorSystem before completing the 
termination
    future.
    
    ## Brief change log
    
    - Introduce an `internalTerminationFuture` which is passed to the 
`AkkaRpcActors`
    - Use `internalTerminationFuture` to capture shut down exceptions in the 
`RpcEndpoint`
    - Use `Patterns.gracefulShutdown` with a `Kill` message to terminate 
`AkkaRpcActors`
    - Wait on the completion of the `Patterns.gracefulShutdown` returned future 
and the `internalTerminationFuture` to complete the `RpcEndpoint's` termination 
future
    - Also complete the `RpcEndpoint's` termination future when stopping the 
complete `AkkaRpcService`
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
    - `AkkaRcpActorTest#testActorTerminationWhenServiceShutdown` tests that the 
termination future of a `RpcEndpoint` is completed when the underlying 
`RpcService` is shut down.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not applicable)
    


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

    $ git pull https://github.com/tillrohrmann/flink fixTerminationFuture

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

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

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

    This closes #4770
    
----
commit 5a90abe582a9ea238cd767acf50854feb80de3f9
Author: Till Rohrmann <[email protected]>
Date:   2017-10-02T20:29:12Z

    [FLINK-7754] [rpc] Complete termination future after actor has been stopped
    
    This commit waits not until the Actor has called postStop but also until 
the actor
    has been completely shut down by the ActorSystem before completing the 
termination
    future.

----


> Complete termination future after actor has been stopped.
> ---------------------------------------------------------
>
>                 Key: FLINK-7754
>                 URL: https://issues.apache.org/jira/browse/FLINK-7754
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Distributed Coordination
>    Affects Versions: 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>              Labels: flip-6
>
> At the moment, we complete the termination future when the {{postStop}} 
> method of the {{RpcActor}} has been executed. This, however, does not mean 
> that the underlying actor has been stopped. We should rather complete the 
> future in the {{AkkaRpcService#stopServer}} method where we close the actor 
> with a graceful shutdown.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to