congbobo184 commented on code in PR #23040:
URL: https://github.com/apache/pulsar/pull/23040#discussion_r1683986483


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadSheddingTask.java:
##########
@@ -40,19 +42,27 @@ public class LoadSheddingTask implements Runnable {
 
     private volatile ScheduledFuture<?> future;
 
+    private final ManagedLedgerFactory factory;
+
     public LoadSheddingTask(AtomicReference<LoadManager> loadManager,
                             ScheduledExecutorService loadManagerExecutor,
-                            ServiceConfiguration config) {
+                            ServiceConfiguration config,
+                            ManagedLedgerFactory factory) {
         this.loadManager = loadManager;
         this.loadManagerExecutor = loadManagerExecutor;
         this.config = config;
+        this.factory = factory;
     }
 
     @Override
     public void run() {
         if (isCancel) {
             return;
         }
+        if (factory instanceof ManagedLedgerFactoryImpl

Review Comment:
   I think we only need to add a interface in ManagedLedgerFactory named 
isMetadataServiceAvailable() is enough, right? it seems we don't use any 
MetaStore interface now



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