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

[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #11543: Fix thread pool configuration is invalid

AlbumenJ commented on code in PR #11543:
URL: https://github.com/apache/dubbo/pull/11543#discussion_r1111605618


##########
dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/manager/DefaultExecutorRepository.java:
##########
@@ -140,9 +141,21 @@ private ExecutorService createExecutor(URL url) {
         return (ExecutorService) extensionAccessor.getExtensionLoader(ThreadPool.class).getAdaptiveExtension().getExecutor(url);
     }
 
+    private Map<Integer, ExecutorService> getExecutors(URL url) {
+        Map<Integer, ExecutorService> executors;
+        // if it's on the provider side and has user-defined services, use biz service executor first, avoid using internal executor
+        if (PROVIDER_SIDE.equalsIgnoreCase(url.getParameter(SIDE_KEY))
+            && data.containsKey(EXECUTOR_SERVICE_COMPONENT_KEY)) {
+            executors = data.get(EXECUTOR_SERVICE_COMPONENT_KEY);
+        } else {
+            executors = data.get(getExecutorKey(url));
+        }
+        return executors;
+    }
+

Review Comment:
   I have a question that why `ServiceDescriptor serviceDescriptor = applicationModel.getInternalModule().getServiceRepository().lookupService(url.getServiceInterface());` not work?



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