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_r226347381
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
##########
@@ -263,14 +274,41 @@ private void handleRpcInvocation(RpcInvocation
rpcInvocation) {
if (throwable
!= null) {
promise.failure(throwable);
} else {
-
promise.success(value);
+ long
resultSize = 0;
+ if
(isRemoteSender) {
+
try {
+
resultSize = new SerializedValue(value).getByteArray().length;
+
if (resultSize > maximumFramesize) {
+
promise.failure(new Throwable("The result size exceeds the
maximum " +
+
"size, result size is " + resultSize + ", maximum frame
size is " +
+
maximumFramesize + " ."));
+
} else {
+
promise.success(value);
Review comment:
I think it would be better to send the `SerializedValue`. That way we save
some extra serialization work. This, of course, requires that the receiver
expects a `SerializedValue`.
----------------------------------------------------------------
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