You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "JianhuaGong (via GitHub)" <gi...@apache.org> on 2024/09/12 13:22:15 UTC
[I] 在client filter耗时比较长且业务请求超时配置比较短的情况下, 全链路超时取默认值的逻辑会造成框架行为不符合预期 [servicecomb-java-chassis]
JianhuaGong opened a new issue, #4516:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4516
在servicecomb.invocation.timeout未配置时,而全链路超时时间默认取值为2倍的request.timeout,当request.timeout配置较小时(很多业务配置较小),只要客户端client filter执行时间稍微长一点,就会造成请求报408,不符合使用预期,也与历史行为不一致。
```
private void guardedWait(Invocation invocation) throws InvocationException {
long wait = getWaitTime(invocation);
try {
if (wait <= 0) {
latch.await();
return;
}
if (latch.await(wait, TimeUnit.MILLISECONDS)) {
return;
}
} catch (InterruptedException e) {
//ignore
}
throw new InvocationException(REQUEST_TIMEOUT, ExceptionCodes.INVOCATION_TIMEOUT, "Invocation Timeout.");
}
private long getWaitTime(Invocation invocation) {
if (invocation.getOperationMeta().getConfig().getMsInvocationTimeout() > 0) {
return invocation.getOperationMeta().getConfig().getMsInvocationTimeout();
}
return invocation.getOperationMeta().getConfig().getMsRequestTimeout() * 2;
}
```
--
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: commits-unsubscribe@servicecomb.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 在client filter耗时比较长且业务请求超时配置比较短的情况下, 全链路超时取默认值的逻辑会造成框架行为不符合预期 [servicecomb-java-chassis]
Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 closed issue #4516: 在client filter耗时比较长且业务请求超时配置比较短的情况下, 全链路超时取默认值的逻辑会造成框架行为不符合预期
URL: https://github.com/apache/servicecomb-java-chassis/issues/4516
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org