flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Rohrmann (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-7295) Add callback for proper RpcEndpoint shut down
Date Fri, 28 Jul 2017 13:53:01 GMT
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

View raw message