You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "aamingaa (via GitHub)" <gi...@apache.org> on 2023/04/06 02:44:22 UTC

[GitHub] [dubbo] aamingaa commented on a diff in pull request #11975: Performance Optimization

aamingaa commented on code in PR #11975:
URL: https://github.com/apache/dubbo/pull/11975#discussion_r1159229192


##########
dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/manager/DefaultExecutorRepository.java:
##########
@@ -131,16 +134,36 @@ private String getExecutorSecondKey(URL url) {
         }
     }
 
+    private String getExecutorSecondKey(ServiceModel serviceModel, URL url) {
+        if (serviceModel instanceof ConsumerModel) {
+            return getConsumerKey(serviceModel);
+        } else {
+            return getProviderKey((ProviderModel) serviceModel, url);
+        }
+    }
+
     private String getConsumerKey(URL url) {
         // Consumer's executor is sharing globally, key=Integer.MAX_VALUE
         return String.valueOf(Integer.MAX_VALUE);
     }
 
+    private static final String MAX_KEY = String.valueOf(Integer.MAX_VALUE);

Review Comment:
   final variable should move to top



-- 
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