[ https://issues.apache.org/jira/browse/FLINK-7295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Till Rohrmann closed FLINK-7295. -------------------------------- Resolution: Fixed Fix Version/s: 1.4.0 Fixed via 80468b15c0e5976f2b45160f9ed833a237cb6fcd > 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 > Fix For: 1.4.0 > > > 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)