You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/01 02:29:04 UTC

[GitHub] [pulsar] leizhiyuan commented on issue #15861: metadata-store thread should not execute onPoliciesUpdate synchronized when PoliciesUpdate

leizhiyuan commented on issue #15861:
URL: https://github.com/apache/pulsar/issues/15861#issuecomment-1143051751

   ```
   protected CompletableFuture<Void> receivedNotification(Notification notification) {
           try {
               return CompletableFuture.supplyAsync(() -> {
                   listeners.forEach(listener -> {
                       try {
                           listener.accept(notification);
                       } catch (Throwable t) {
                           log.error("Failed to process metadata store notification", t);
                       }
                   });
   
                   return null;
               }, executor);
           } catch (RejectedExecutionException e) {
               return FutureUtil.failedFuture(e);
           }
       }
   ```
   
   it seems here use a single thread ,  maybe the owner want to keep order?  can we use ordered threadpool to execute receivedNotification? 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org