merlimat commented on a change in pull request #13809:
URL: https://github.com/apache/pulsar/pull/13809#discussion_r788057087



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/PulsarZooKeeperClient.java
##########
@@ -296,6 +297,8 @@ protected PulsarZooKeeperClient(String connectString,
         this.connectExecutor =
                 Executors.newSingleThreadExecutor(
                         new 
ThreadFactoryBuilder().setNameFormat("ZKC-connect-executor-%d").build());
+        this.callbackExecutor = Executors.newCachedThreadPool(

Review comment:
       I think the logic of the executor belongs to the AbstractMetadataStore 
since it's applicable to all the implementations under it.

##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java
##########
@@ -301,16 +301,14 @@ private Op convertOp(MetadataOp op) {
 
         try {
             zkc.exists(path, null, (rc, path1, ctx, stat) -> {
-                execute(() -> {

Review comment:
       I don't think it's unnecessary here, otherwise we're triggering the 
future from the ZK event thread.




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


Reply via email to