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_r246335930
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
##########
@@ -263,14 +276,33 @@ private void handleRpcInvocation(RpcInvocation
rpcInvocation) {
if (throwable
!= null) {
promise.failure(throwable);
} else {
-
promise.success(value);
+ if
(!remoteSender) {
+
promise.success(value);
+ } else {
+
Either<SerializedValue, AkkaRpcException> serializedResult =
+
serializeRemoteResultAndVerifySize(value, method.getName());
+
if (serializedResult.isLeft()) {
+
promise.success(serializedResult.left());
+
} else {
+
promise.failure(new Throwable(serializedResult.right()));
+
}
+ }
}
});
Patterns.pipe(promise.future(),
getContext().dispatcher()).to(getSender());
} else {
- // tell the sender the result
of the computation
- getSender().tell(new
Status.Success(result), getSelf());
+ if (!remoteSender) {
+
getSender().tell(result, getSelf());
+ } else {
+ Either<SerializedValue,
AkkaRpcException> serializedResult =
+
serializeRemoteResultAndVerifySize(result, method.getName());
+ if
(serializedResult.isLeft()) {
+
getSender().tell(serializedResult.left(), getSelf());
Review comment:
Serialized result should be wrapped in `new Status.Success(result)`
----------------------------------------------------------------
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
