Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-11551

Allow RpcEndpoints to execute asynchronous stop operations

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              trohrmann Till Rohrmann
              trohrmann Till Rohrmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m