legend91325 opened a new issue #1875: MergeableClusterInvoker 超时处理逻辑问题 URL: https://github.com/apache/incubator-dubbo/issues/1875 ``` int timeout = getUrl().getMethodParameter(invocation.getMethodName(), Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT); for (Map.Entry<String, Future<Result>> entry : results.entrySet()) { Future<Result> future = entry.getValue(); try { Result r = future.get(timeout, TimeUnit.MILLISECONDS); if (r.hasException()) { log.error("Invoke " + getGroupDescFromServiceKey(entry.getKey()) + " failed: " + r.getException().getMessage(), r.getException()); } else { resultList.add(r); } } catch (Exception e) { throw new RpcException("Failed to invoke service " + entry.getKey() + ": " + e.getMessage(), e); } } ``` 这块取超时配置之后,迭代future来判断处理结果,同时设置了获取超时时间。但是这里是迭代获取结果,如果每个处理都比较慢,后面的请求其实已经超时了,但是在这里并没有处理成功。比如有三个future,其中配置的超时时间是5s,第一个处理时间是4s,第二个是8s,第三个12s 按理说后两个是超时了,但是这里的逻辑回认为三个都处理成功并没有超时。
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
