caoyanan666 commented on code in PR #14009:
URL: https://github.com/apache/dubbo/pull/14009#discussion_r1554800953


##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java:
##########
@@ -68,6 +68,10 @@ public void invoke() {
                     responseObserver.onError(t);
                     return;
                 }
+                if (r.hasException()) {
+                    doOnResponseHasException(r.getException());
+                    return;
+                }

Review Comment:
   
因为直接invoke的response是同步执行的结果,whenCompleteWithContext里面回调的response是异步的AppResponse,只要provider的实现用了异步,在实际的异步结果里面有异常,就会是外面Invoker的response没异常,whenCompleteWithContext回调的appResponse有异常
   
   Because the response of direct invoke is the result of synchronous 
execution, the response of the callback in whenCompleteWithContext is an 
asynchronous AppResponse. As long as the provider implementation uses 
asynchronous, if there is an exception in the actual asynchronous result, it 
will be because the response of the external Invoker is not abnormal, and the 
callback of whenCompleteWithContext is appResponse has exception



-- 
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: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to