zrlw commented on a change in pull request #9273:
URL: https://github.com/apache/dubbo/pull/9273#discussion_r749846114



##########
File path: 
dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/manager/DefaultExecutorRepository.java
##########
@@ -354,10 +346,11 @@ public ScheduledExecutorService 
getSharedScheduledExecutor() {
     }
 
     private ExecutorService createExecutor(URL url) {
-        ExecutorService executorService = (ExecutorService) 
ExtensionLoader.getExtensionLoader(ThreadPool.class).getAdaptiveExtension().getExecutor(url);
+        ExecutorService executorService = (ExecutorService) 
extensionAccessor.getExtensionLoader(ThreadPool.class).getAdaptiveExtension().getExecutor(url);
 
         DataStore dataStore = 
ExtensionLoader.getExtensionLoader(DataStore.class).getDefaultExtension();

Review comment:
       ```extensionAccessor```'s scope might not be default application, 
```executorService``` created by ```extensionAccessor``` will be destroyed with 
```extensionAccessor```'s application by 
DefaultApplicationDeployer.destroyExecutorRepository().
   put ```executorService``` in ```dataStore``` which  scope is default 
application might cause multiple applications access problem when app A is 
destroying and app B is trying to reuse the ```executorService``` that belongs 
to app A which is being destroyed.




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