代码:
Sentinel/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboProviderFilter.java
Line 73 in 4498de4
| | if (result.hasException()) { |
在 dubbo 2.7.5 后,所有 Filter
均支持异步操作,返回的 Result
对象通常是 AsyncRpcResult
,对 AsyncRpcResult
调用 hasException()
时如果异步任务未完成,则使用默认的返回值,永远不包含异常。
https://github.com/apache/dubbo/blob/9c49efeacfd87d2d4409fb000cebd58e1114ec8a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncRpcResult.java#L143-L155
2条答案
按热度按时间gc0ot86w1#
I'll fix it
fdbelqdn2#