You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/16 01:28:52 UTC

[GitHub] [dubbo] JasonKai9527 commented on a diff in pull request #10023: [optimization]RestProtocol opt, share client pool among services and avoid potential memory leak.

JasonKai9527 commented on code in PR #10023:
URL: https://github.com/apache/dubbo/pull/10023#discussion_r922597482


##########
dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java:
##########
@@ -136,65 +133,77 @@ protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcExcept
 
     @Override
     protected <T> T doRefer(Class<T> serviceType, URL url) throws RpcException {
+        ReferenceCountedClient referenceCountedClient = clients.computeIfAbsent(url.getAddress(), _key -> {

Review Comment:
   if the ip:port is the same,but httpclient config properties are different, how to fix th is situation?



##########
dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java:
##########
@@ -136,65 +133,77 @@ protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcExcept
 
     @Override
     protected <T> T doRefer(Class<T> serviceType, URL url) throws RpcException {
+        ReferenceCountedClient referenceCountedClient = clients.computeIfAbsent(url.getAddress(), _key -> {

Review Comment:
   if the ip:port is the same,but httpclient config properties are different, how to fix this situation?



-- 
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-unsubscribe@dubbo.apache.org

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


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