You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Till Rohrmann (JIRA)" <ji...@apache.org> on 2017/07/28 13:53:01 UTC

[jira] [Created] (FLINK-7295) Add callback for proper RpcEndpoint shut down

Till Rohrmann created FLINK-7295:
------------------------------------

             Summary: Add callback for proper RpcEndpoint shut down
                 Key: FLINK-7295
                 URL: https://issues.apache.org/jira/browse/FLINK-7295
             Project: Flink
          Issue Type: Sub-task
          Components: Distributed Coordination
    Affects Versions: 1.4.0
            Reporter: Till Rohrmann
            Assignee: Till Rohrmann


In order to properly shut down {{RpcEndpoints}} it is necessary to have a method which is called by the main thread in case of a shut down and allows to properly close and clean up internal state. At the moment, this clean up work is done by overriding the {{RpcEndpoint#shutDown}} method which can be called by a different thread than the main thread. This is problematic since it violates the {{RpcEndpoint}} contract.

I propose to change the behaviour of {{RpcEndpoint#shutDown}} to be asynchronous. Calling this method will send a message to the {{RpcEndpoint}} which triggers the call of the clean up method and the termination of the endpoint.

In order to obtain the same behaviour as before, the user can obtain the termination future on which it can wait after sending the request to shut down the {{RpcEndpoint}}.



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