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/06/23 06:27:59 UTC

[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #10200: [3.0] Fixed the problem that the service was offline for a long time without re-registration

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


##########
dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/org/apache/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java:
##########
@@ -354,6 +357,15 @@ public void nodeChanged() throws Exception {
 
     static class CuratorWatcherImpl implements CuratorWatcher {
 
+        private static final ExecutorService CURATOR_WATCHER_EXECUTOR_SERVICE = Executors.newSingleThreadExecutor(new ThreadFactory() {
+            @Override
+            public Thread newThread(Runnable r) {
+                Thread thread = new Thread(r);
+                thread.setName("Dubbo-CuratorWatcher-Thread");
+                return thread;
+            }
+        });
+

Review Comment:
   Replace to use `org.apache.dubbo.common.threadpool.manager.FrameworkExecutorRepository#getSharedExecutor`.
   
   ```java
   getUrl().getOrDefaultFrameworkModel().getBeanFactory()
               .getBean(FrameworkExecutorRepository.class).getSharedExecutor();
   ```



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