thetumbled commented on code in PR #22949: URL: https://github.com/apache/pulsar/pull/22949#discussion_r1666768514
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java: ########## @@ -270,7 +270,12 @@ public void initialize(final PulsarService pulsar) { () -> LoadManagerShared.refreshBrokerToFailureDomainMap(pulsar, brokerToFailureDomainMap)); }); - loadSheddingStrategy = createLoadSheddingStrategy(); + if (placementStrategy instanceof LoadSheddingStrategy) { + // bind the load shedding strategy and the placement strategy + loadSheddingStrategy = (LoadSheddingStrategy) placementStrategy; + } else { + loadSheddingStrategy = createLoadSheddingStrategy(); Review Comment: If we use `AvgShedder` for `LoadSheddingStrategy`, and use others as `ModularLoadManagerStrategy`, we should throw out the exceptions? or should we log an error only? -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org