heesung-sn commented on code in PR #21085:
URL: https://github.com/apache/pulsar/pull/21085#discussion_r1309134566
##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/BundleData.java:
##########
@@ -103,4 +97,13 @@ public int getTopics() {
public void setTopics(int topics) {
this.topics = topics;
}
+
+ @Override
+ public int compareTo(BundleData o) {
+ int result = this.longTermData.compareTo(o.longTermData);
+ if (result == 0) {
+ result = this.shortTermData.compareTo(o.shortTermData);
+ }
Review Comment:
What if short-term data is significantly higher than long-term's?
##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/TimeAverageMessageData.java:
##########
@@ -41,15 +41,20 @@ public class TimeAverageMessageData {
// The average message rate out per second.
private double msgRateOut;
+ // Consider the throughput equal if difference is less than 100 KB/s
+ private static final double throughputDifferenceThreshold = 1e5;
+ // Consider the msgRate equal if the difference is less than 100
+ private static final double msgRateDifferenceThreshold = 100;
Review Comment:
What's the justification for these vals?
--
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]