michaeljmarshall commented on PR #19559: URL: https://github.com/apache/pulsar/pull/19559#issuecomment-1439549185
> > Please discuss this change on the mailing list. This is a fundamental change. > > I don't think it is a fundamental change. This is an obvious bug , memory is not used in the `getMaxResourceUsage` method in the same class. Two methods to get MaxResourceUsage, but the behavior is different > > https://github.com/apache/pulsar/blob/660525e57ed35b74cb9204521d1fba02cc08c542/pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LocalBrokerData.java#L239-L243 > > https://github.com/apache/pulsar/blob/660525e57ed35b74cb9204521d1fba02cc08c542/pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LocalBrokerData.java#L253-L259 Thanks for the references. This justification would have been very helpful to provide in the PR description. I missed https://github.com/apache/pulsar/pull/17598, which made the inconsistent change that you reference. Before https://github.com/apache/pulsar/pull/17598, we used memory for both methods. That change could certainly have had a note on the mailing list since it is a fundamental change to how the load balancer works. This change will affect the `LeastResourceUsageWithWeight` and the `ThresholdShedder`. Interestingly, https://github.com/apache/pulsar/pull/17598 addresses the content of this PR and also addresses @Jason918's comment: > Note that this PR does not update `getMaxResourceUsageWithWeight*()`, as it already controls the memory usage by `loadBalancerMemoryResourceWeight=0.0` However, from what I see, `loadBalancerMemoryResourceWeight` defaults to 1, not 0. -- 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]
