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/07/18 12:59:21 UTC

[GitHub] [pulsar] lordcheng10 commented on a diff in pull request #16408: [fix][broker] Support loadBalancerSheddingIntervalMinutes dynamic configuration

lordcheng10 commented on code in PR #16408:
URL: https://github.com/apache/pulsar/pull/16408#discussion_r923344486


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -1032,9 +1030,10 @@ protected void startLeaderElectionService() {
                             if (loadResourceQuotaTask != null) {
                                 loadResourceQuotaTask.cancel(false);
                             }
-                            loadSheddingTask = loadManagerExecutor.scheduleAtFixedRate(
-                                    new LoadSheddingTask(loadManager),
-                                    loadSheddingInterval, loadSheddingInterval, TimeUnit.MILLISECONDS);
+                            loadSheddingTask = loadManagerExecutor.schedule(
+                                    new LoadSheddingTask(loadManager, loadManagerExecutor, config),
+                                    TimeUnit.MINUTES.toMillis(config.getLoadBalancerSheddingIntervalMinutes()),
+                                    TimeUnit.MILLISECONDS);

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

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