lifepuzzlefun commented on code in PR #20972:
URL: https://github.com/apache/pulsar/pull/20972#discussion_r1299097317
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java:
##########
@@ -1152,6 +1152,16 @@ public void writeBundleDataOnZooKeeper() {
for (Map.Entry<String, BundleData> entry :
loadData.getBundleData().entrySet()) {
final String bundle = entry.getKey();
final BundleData data = entry.getValue();
+ if (((conf.getLoadBalancerBundleThroughputThresholdInByte() > 0
+ && data.getLongTermData().getMsgThroughputIn()
+ < conf.getLoadBalancerBundleThroughputThresholdInByte())
+ || (conf.getLoadBalancerBundleMsgThreshold() > 0
+ && data.getLongTermData().getMsgRateIn() <
conf.getLoadBalancerBundleMsgThreshold()))
+ && bundlesCache.exists(getBundleDataPath(bundle)).join()) {
Review Comment:
maybe we can use `bundlesCache.getChildren` to get current exists bundle
data on zk to reduce zk exist call
--
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]