BurningCN commented on a change in pull request #9723:
URL: https://github.com/apache/dubbo/pull/9723#discussion_r815305934



##########
File path: 
dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
##########
@@ -181,13 +185,32 @@ private void invoke(Channel channel, String methodKey) {
             Invocation invocation = createInvocation(channel, 
channel.getUrl(), methodKey);
             if (invocation != null) {
                 try {
+                    if 
(Boolean.TRUE.toString().equals(invocation.getAttachment(STUB_EVENT_KEY))) {
+                        getOrWaitStubService(channel, invocation);
+                    }
                     received(channel, invocation);
                 } catch (Throwable t) {
                     logger.warn("Failed to invoke event method " + 
invocation.getMethodName() + "(), cause: " + t.getMessage(), t);
                 }
             }
         }
 
+        private void getOrWaitStubService(Channel channel, Invocation 
invocation) throws InterruptedException {
+            try {
+                Invoker<?> invoker = getInvoker(channel, invocation);

Review comment:
       If getInvoker throws an exception, it means that the stub service has 
not been exposed, it will try to wait for the signal that the stub exposure is 
complete, and then call back the related methods of the stub service.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to