提交 8c8610f9 编写于 作者: J Jaskey 提交者: dongeforever

[ROCKETMQ-188]RemotingExecption is not consistent between invoke async and...

[ROCKETMQ-188]RemotingExecption is not consistent between invoke async and invoke oneway closes apache/incubator-rocketmq#98
上级 b1fcf1b8
...@@ -416,6 +416,9 @@ public abstract class NettyRemotingAbstract { ...@@ -416,6 +416,9 @@ public abstract class NettyRemotingAbstract {
PLOG.warn("send a request command to channel <" + RemotingHelper.parseChannelRemoteAddr(channel) + "> Exception", e); PLOG.warn("send a request command to channel <" + RemotingHelper.parseChannelRemoteAddr(channel) + "> Exception", e);
throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
} }
} else {
if (timeoutMillis <= 0) {
throw new RemotingTooMuchRequestException("invokeAsyncImpl invoke too fast");
} else { } else {
String info = String info =
String.format("invokeAsyncImpl tryAcquire semaphore timeout, %dms, waiting thread nums: %d semaphoreAsyncValue: %d", // String.format("invokeAsyncImpl tryAcquire semaphore timeout, %dms, waiting thread nums: %d semaphoreAsyncValue: %d", //
...@@ -424,7 +427,8 @@ public abstract class NettyRemotingAbstract { ...@@ -424,7 +427,8 @@ public abstract class NettyRemotingAbstract {
this.semaphoreAsync.availablePermits()// this.semaphoreAsync.availablePermits()//
); );
PLOG.warn(info); PLOG.warn(info);
throw new RemotingTooMuchRequestException(info); throw new RemotingTimeoutException(info);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册