tillrohrmann opened a new pull request #11683: [FLINK-15347] Add SupervisorActor which monitors the proper termination of AkkaRpcActors URL: https://github.com/apache/flink/pull/11683 ## What is the purpose of the change In order to properly complete the termination future of an RpcEndpoint, we need to monitor when the underlying AkkaRpcActor has been removed from the ActorSystem. If this is not done, then it can happen that another RpcEndpoint using the same name cannot be started because the old RpcEndpoint is still registered. The way we achieve this monitoring is to introduce a helper actor which is responsible for starting the AkkaRpcActors for all RpcEndpoints. Since the SupervisorActor is the parent of all RpcEndpoints, it can tell when they are being removed from the ActorSystem through the SupervisorStrategy. A consequence of the new actor is that the akka urls change from akka://flink@actorsystem:port/user/xyz to akka://flink@actorsystem:port/user/rpc/xyz. The respective method AkkaRpcServiceUtils.getRpcUrl has been updated to reflect this change. This hierarchy change also warrants the bump of the AkkaRpcService.VERSION. The failure behaviour of the underlying ActorSystem has been changed so that it terminates all running actors if an exception is thrown from the SupervisorActor. The assumption is that such an exception always indicates a programming error and is unrecoverable. The same applies to failure originating from an AkkaRpcActor (children of the SupervisorActor). If such an exception is thrown, then we assume that the system is in an illegal state and shut it down. The way it works is by recording the failure cause for the respective AkkaRpcActor and then terminating the ActorSystem. ## Verifying this change - Added `AkkaActorSystemTest`, `SupervisorActorTest` and `AkkaRpcActorTest.canReuseEndpointNameAfterTermination`. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
