mridulm commented on a change in pull request #33617: URL: https://github.com/apache/spark/pull/33617#discussion_r687339894
########## File path: common/network-common/src/main/java/org/apache/spark/network/server/TransportRequestHandler.java ########## @@ -249,8 +249,17 @@ public String getID() { wrappedCallback.onComplete(wrappedCallback.getID()); } } catch (Exception e) { - logger.error("Error while invoking RpcHandler#receive() on RPC id " + req.requestId, e); - respond(new RpcFailure(req.requestId, Throwables.getStackTraceAsString(e))); + if (e instanceof BlockPushNonFatalFailure) { + // Thrown by rpcHandler.receiveStream(reverseClient, meta, callback), the same as + // onComplete method. Respond an RPC message with the error code to client instead of + // using exceptions encoded in the RPCFailure. Using a proper RPCResponse is more + // efficient, and now only include the too old attempt case here. + respond(new RpcResponse(req.requestId, Review comment: I am fine with with `BlockPushNonFatalFailure` and a `ReturnCode` for the case. I am sure we will have more cases in future as we extend this. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org