horizonzy commented on code in PR #23040:
URL: https://github.com/apache/pulsar/pull/23040#discussion_r1683752318
##########
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:
We would better export ManagedLedgerFactory#getMetaStore, then check whether
the metaStore is available or not.
--
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]