mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-01 15:47:01 +08:00
[ROCKETMQ-188]RemotingExecption is not consistent between invoke async and invoke oneway closes apache/incubator-rocketmq#98
This commit is contained in:
+12
-8
@@ -417,14 +417,18 @@ public abstract class NettyRemotingAbstract {
|
||||
throw new RemotingSendRequestException(RemotingHelper.parseChannelRemoteAddr(channel), e);
|
||||
}
|
||||
} else {
|
||||
String info =
|
||||
String.format("invokeAsyncImpl tryAcquire semaphore timeout, %dms, waiting thread nums: %d semaphoreAsyncValue: %d", //
|
||||
timeoutMillis, //
|
||||
this.semaphoreAsync.getQueueLength(), //
|
||||
this.semaphoreAsync.availablePermits()//
|
||||
);
|
||||
PLOG.warn(info);
|
||||
throw new RemotingTooMuchRequestException(info);
|
||||
if (timeoutMillis <= 0) {
|
||||
throw new RemotingTooMuchRequestException("invokeAsyncImpl invoke too fast");
|
||||
} else {
|
||||
String info =
|
||||
String.format("invokeAsyncImpl tryAcquire semaphore timeout, %dms, waiting thread nums: %d semaphoreAsyncValue: %d", //
|
||||
timeoutMillis, //
|
||||
this.semaphoreAsync.getQueueLength(), //
|
||||
this.semaphoreAsync.availablePermits()//
|
||||
);
|
||||
PLOG.warn(info);
|
||||
throw new RemotingTimeoutException(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user