This is an automated email from the ASF dual-hosted git repository.

houxiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 677d160148a [cleanup][broker] Remove unused cache executor in 
`PulsarService` (#20563)
677d160148a is described below

commit 677d160148afc935c34a072fb62b765a8a65045c
Author: lifepuzzlefun <[email protected]>
AuthorDate: Tue Jun 20 12:10:41 2023 +0800

    [cleanup][broker] Remove unused cache executor in `PulsarService` (#20563)
    
    Co-authored-by: wangjinlong <[email protected]>
    ### Motivation
    
    Remove unused cache executor in PulsarService
---
 .../main/java/org/apache/pulsar/broker/ServiceConfiguration.java  | 1 +
 .../src/main/java/org/apache/pulsar/broker/PulsarService.java     | 8 --------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index a709e49e3a9..dfddbbbb26e 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -297,6 +297,7 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
             + "The cache executor thread pool is used for restarting global 
zookeeper session. "
             + "Default is 10"
     )
+    @Deprecated
     private int numCacheExecutorThreadPoolSize = 10;
 
     @FieldContext(
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
index 62d4634fa2d..00dfad40191 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
@@ -206,7 +206,6 @@ public class PulsarService implements AutoCloseable, 
ShutdownService {
     private ResourceGroupService resourceGroupServiceManager;
 
     private final ScheduledExecutorService executor;
-    private final ScheduledExecutorService cacheExecutor;
 
     private OrderedExecutor orderedExecutor;
     private final ScheduledExecutorService loadManagerExecutor;
@@ -324,8 +323,6 @@ public class PulsarService implements AutoCloseable, 
ShutdownService {
         this.functionWorkerService = functionWorkerService;
         this.executor = 
Executors.newScheduledThreadPool(config.getNumExecutorThreadPoolSize(),
                 new ExecutorProvider.ExtendedThreadFactory("pulsar"));
-        this.cacheExecutor = 
Executors.newScheduledThreadPool(config.getNumCacheExecutorThreadPoolSize(),
-                new 
ExecutorProvider.ExtendedThreadFactory("zk-cache-callback"));
 
         if (config.isTransactionCoordinatorEnabled()) {
             this.transactionExecutorProvider = new 
ExecutorProvider(this.getConfiguration()
@@ -543,7 +540,6 @@ public class PulsarService implements AutoCloseable, 
ShutdownService {
             executorServicesShutdown.shutdown(offloaderScheduler);
             executorServicesShutdown.shutdown(executor);
             executorServicesShutdown.shutdown(orderedExecutor);
-            executorServicesShutdown.shutdown(cacheExecutor);
 
             LoadManager loadManager = this.loadManager.get();
             if (loadManager != null) {
@@ -1454,10 +1450,6 @@ public class PulsarService implements AutoCloseable, 
ShutdownService {
         return executor;
     }
 
-    public ScheduledExecutorService getCacheExecutor() {
-        return cacheExecutor;
-    }
-
     public ExecutorProvider getTransactionExecutorProvider() {
         return transactionExecutorProvider;
     }

Reply via email to