提交 7ab59a33 编写于 作者: 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
上级 031347db
...@@ -417,14 +417,18 @@ public abstract class NettyRemotingAbstract { ...@@ -417,14 +417,18 @@ public abstract class NettyRemotingAbstract {
throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e); throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
} }
} else { } else {
String info = if (timeoutMillis <= 0) {
String.format("invokeAsyncImpl tryAcquire semaphore timeout, %dms, waiting thread nums: %d semaphoreAsyncValue: %d", // throw new RemotingTooMuchRequestException("invokeAsyncImpl invoke too fast");
timeoutMillis, // } else {
this.semaphoreAsync.getQueueLength(), // String info =
this.semaphoreAsync.availablePermits()// String.format("invokeAsyncImpl tryAcquire semaphore timeout, %dms, waiting thread nums: %d semaphoreAsyncValue: %d", //
); timeoutMillis, //
PLOG.warn(info); this.semaphoreAsync.getQueueLength(), //
throw new RemotingTooMuchRequestException(info); this.semaphoreAsync.availablePermits()//
);
PLOG.warn(info);
throw new RemotingTimeoutException(info);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册