lordcheng10 commented on code in PR #16408:
URL: https://github.com/apache/pulsar/pull/16408#discussion_r923344671
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadSheddingTask.java:
##########
@@ -28,15 +31,25 @@
public class LoadSheddingTask implements Runnable {
private static final Logger LOG =
LoggerFactory.getLogger(LoadSheddingTask.class);
private final AtomicReference<LoadManager> loadManager;
+ private final ScheduledExecutorService loadManagerExecutor;
- public LoadSheddingTask(AtomicReference<LoadManager> loadManager) {
+ private final ServiceConfiguration config;
+
+ public LoadSheddingTask(AtomicReference<LoadManager> loadManager,
+ ScheduledExecutorService loadManagerExecutor,
+ ServiceConfiguration config) {
this.loadManager = loadManager;
+ this.loadManagerExecutor = loadManagerExecutor;
+ this.config = config;
}
@Override
public void run() {
try {
loadManager.get().doLoadShedding();
+ loadManagerExecutor.schedule(new LoadSheddingTask(loadManager,
loadManagerExecutor, config),
Review Comment:
fixed
--
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]