[ https://issues.apache.org/jira/browse/FLINK-11551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Till Rohrmann resolved FLINK-11551. ----------------------------------- Resolution: Fixed Fixed via 3d200070c4404dbce61d80fcdda4509ece383937 > Allow RpcEndpoints to execute asynchronous stop operations > ---------------------------------------------------------- > > Key: FLINK-11551 > URL: https://issues.apache.org/jira/browse/FLINK-11551 > Project: Flink > Issue Type: Improvement > Components: Distributed Coordination > Affects Versions: 1.7.1, 1.8.0 > Reporter: Till Rohrmann > Assignee: Till Rohrmann > Priority: Major > Labels: pull-request-available > Fix For: 1.8.0 > > Time Spent: 10m > Remaining Estimate: 0h > > Some {{RpcEndpoints}} would benefit from being able to run asynchronous stop > operations in the main thread executor. At the moment, this is not possible > since {{RpcEndpoint#postStop}} is called by by {{UntypedActor#postStop}} > which is the last call for an actor. > I suggest to introduce a new method {{RpcEndpoint#onStop}} which is executed > when the {{RpcEndpoint}} is requested to terminate. Internally, this method > will be called when the {{UntypedActor}} is still running, thus, allowing to > execute arbitrary other messages (e.g. asynchronous operations in the main > thread executor). Only after the future returned by {{onStop}} is completed, > the underlying {{UntypedActor}} will shut down. -- This message was sent by Atlassian JIRA (v7.6.3#76005)