You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lifepuzzlefun (via GitHub)" <gi...@apache.org> on 2023/02/18 10:30:21 UTC

[GitHub] [pulsar] lifepuzzlefun commented on a diff in pull request #19560: [fix][broker] Fixed history load not releasing

lifepuzzlefun commented on code in PR #19560:
URL: https://github.com/apache/pulsar/pull/19560#discussion_r1110978618


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java:
##########
@@ -233,5 +237,23 @@ private Pair<Boolean, String> getMaxUsageBroker(
         }
         return Pair.of(hasBrokerBelowLowerBound, maxUsageBrokerName);
     }
+    @Override
+    public void onBrokerChange(Set<String> newBrokers) {
+        synchronized (activeBrokers) {
+            activeBrokers.clear();
+            activeBrokers.addAll(newBrokers);
+        }
+    }
+
+    private void cleanUnActiveBroker() {

Review Comment:
   can this method be called only when necessary ? 



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