zentol commented on a change in pull request #16345:
URL: https://github.com/apache/flink/pull/16345#discussion_r665926085
##########
File path:
flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
##########
@@ -144,12 +147,21 @@ public void postStop() throws Exception {
@Override
public Receive createReceive() {
return ReceiveBuilder.create()
- .match(RemoteHandshakeMessage.class,
this::handleHandshakeMessage)
- .match(ControlMessages.class, this::handleControlMessage)
- .matchAny(this::handleMessage)
+ .match(
+ RemoteHandshakeMessage.class,
+
withCleanContextClassLoader(this::handleHandshakeMessage))
+ .match(
+ ControlMessages.class,
+
withCleanContextClassLoader(this::handleControlMessage))
+ .matchAny(withCleanContextClassLoader(this::handleMessage))
Review comment:
It's a catch-all for any operation by the AkkaRpcActor that executes
something / completes a future which step into Flink land. I felt it was more
maintainable to do it this way, then having it scattered around in the
individual methods.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]