chickenlj commented on a change in pull request #9723:
URL: https://github.com/apache/dubbo/pull/9723#discussion_r832843981
##########
File path:
dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
##########
@@ -702,6 +728,8 @@ public void destroy() {
}
}
referenceClientMap.clear();
+
+ stubServiceToLatch.clear();
Review comment:
I think we should take destroy of stubServiceToLatch on destroy of stub
proxy too.
There might have lots of proxy invokers (reference config) create and
destroy during the lifetime of DubboProtocol.
##########
File path:
dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
##########
@@ -702,6 +728,8 @@ public void destroy() {
}
}
referenceClientMap.clear();
+
+ stubServiceToLatch.clear();
Review comment:
I don't think waiting for the stub to be ready is necessary for it will
make the whole process more complicated. Just giving a more elegant and clear
Exception or result would be enough. What do you think? @BurningCN
##########
File path:
dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
##########
@@ -253,7 +276,8 @@ private boolean isClientSide(Channel channel) {
// if it's callback service on client side
isStubServiceInvoke =
Boolean.TRUE.toString().equals(inv.getObjectAttachments().get(STUB_EVENT_KEY));
if (isStubServiceInvoke) {
- port = channel.getRemoteAddress().getPort();
+ // The port of the client exposed stub service is 0
+ port = 0;
Review comment:
One similar PR has been merged into the master branch
https://github.com/apache/dubbo/pull/9825
--
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]