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/08/19 04:55:03 UTC
[GitHub] [pulsar] lifepuzzlefun commented on a diff in pull request #20972: [improve] [broker] PIP-294: Filter Low Throughput Bundles For Report.
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org