tillrohrmann commented on a change in pull request #6876: [FLINK-10251] Handle 
oversized response messages in AkkaRpcActor
URL: https://github.com/apache/flink/pull/6876#discussion_r246336494
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
 ##########
 @@ -281,6 +313,28 @@ private void handleRpcInvocation(RpcInvocation 
rpcInvocation) {
                }
        }
 
+       protected boolean isRemoteSender() {
+               return !getSender().path().address().hasLocalScope();
+       }
+
+       private Either<SerializedValue, AkkaRpcException> 
serializeRemoteResultAndVerifySize(
+               Object result, String methodName) {
+               try {
+                       SerializedValue serializedResult = new 
SerializedValue(result);
+
+                       long resultSize = 
serializedResult.getByteArray().length;
+                       if (resultSize > maximumFramesize) {
+                               return Either.Right(new AkkaRpcException(
+                                       "The result size " + resultSize + " 
exceeds the maximum " + "size " + maximumFramesize + " ."));
 
 Review comment:
   Please also include the method name in the exception. That way we know which 
rpc call produced a too large response.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to