Oliverwqcwrw commented on code in PR #6188:
URL: https://github.com/apache/rocketmq/pull/6188#discussion_r1155862430
##########
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:
##########
@@ -337,8 +337,13 @@ private Runnable
buildProcessRequestHandler(ChannelHandlerContext ctx, RemotingC
log.error(cmd.toString());
if (!cmd.isOnewayRPC()) {
- response =
RemotingCommand.createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR,
- UtilAll.exceptionSimpleDesc(e));
+ if
(RemotingHelper.ACL_EXCEPTION.equals(e.getClass().getSimpleName())) {
Review Comment:
Couldn't agree more - (The NettyRemotingAbstract should not care about ACL
or specific error reason).
However, the exception that the acl fails occurs in the `RpcHook`, which is
before the processor. The current design of exception handling is that when the
`RpcHook` fails, the response is assembled in the `NettyRemotingAbstract` and
written directly to the channel
So I did it in the `NettyRemotingAbstract` even though it's not very elegant
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]