Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-51023][CORE] log remote address on RPC exception #49718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ public void onFailure(Throwable e) {
}
});
} catch (Exception e) {
logger.error("Error while invoking RpcHandler#receive() on RPC id {}", e,
MDC.of(LogKeys.REQUEST_ID$.MODULE$, req.requestId));
logger.error("Error while invoking RpcHandler#receive() on RPC id {} from {}", e,
MDC.of(LogKeys.REQUEST_ID$.MODULE$, req.requestId),
MDC.of(LogKeys.HOST_PORT$.MODULE$, getRemoteAddress(channel)));
respond(new RpcFailure(req.requestId, Throwables.getStackTraceAsString(e)));
} finally {
req.body().release();
Expand Down Expand Up @@ -262,8 +263,9 @@ public String getID() {
respond(new RpcResponse(req.requestId,
new NioManagedBuffer(blockPushNonFatalFailure.getResponse())));
} else {
logger.error("Error while invoking RpcHandler#receive() on RPC id {}", e,
MDC.of(LogKeys.REQUEST_ID$.MODULE$, req.requestId));
logger.error("Error while invoking RpcHandler#receive() on RPC id {} from {}", e,
MDC.of(LogKeys.REQUEST_ID$.MODULE$, req.requestId),
MDC.of(LogKeys.HOST_PORT$.MODULE$, getRemoteAddress(channel)));
respond(new RpcFailure(req.requestId, Throwables.getStackTraceAsString(e)));
}
// We choose to totally fail the channel, rather than trying to recover as we do in other
Expand All @@ -279,7 +281,8 @@ private void processOneWayMessage(OneWayMessage req) {
try {
rpcHandler.receive(reverseClient, req.body().nioByteBuffer());
} catch (Exception e) {
logger.error("Error while invoking RpcHandler#receive() for one-way message.", e);
logger.error("Error while invoking RpcHandler#receive() for one-way message from {}.", e,
MDC.of(LogKeys.HOST_PORT$.MODULE$, getRemoteAddress(channel)));
} finally {
req.body().release();
}
Expand All @@ -304,9 +307,10 @@ public void onFailure(Throwable e) {
});
} catch (Exception e) {
logger.error("Error while invoking receiveMergeBlockMetaReq() for appId {} shuffleId {} "
+ "reduceId {}", e, MDC.of(LogKeys.APP_ID$.MODULE$, req.appId),
+ "reduceId {} from {}", e, MDC.of(LogKeys.APP_ID$.MODULE$, req.appId),
MDC.of(LogKeys.SHUFFLE_ID$.MODULE$, req.shuffleId),
MDC.of(LogKeys.REDUCE_ID$.MODULE$, req.reduceId));
MDC.of(LogKeys.REDUCE_ID$.MODULE$, req.reduceId),
MDC.of(LogKeys.HOST_PORT$.MODULE$, getRemoteAddress(channel)));
respond(new RpcFailure(req.requestId, Throwables.getStackTraceAsString(e)));
}
}
Expand Down