You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/04 02:03:40 UTC

[GitHub] [pulsar] Jason918 commented on a change in pull request #12604: Optimize OverloadShedder: Sort bundle by throughput in ascending order

Jason918 commented on a change in pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#discussion_r742473185



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/OverloadShedder.java
##########
@@ -121,8 +121,8 @@
                 }).filter(e ->
                         localData.getBundles().contains(e.getLeft())
                 ).sorted((e1, e2) -> {
-                    // Sort by throughput in reverse order
-                    return Double.compare(e2.getRight(), e1.getRight());
+                    // Sort by throughput in ascending order

Review comment:
       Are you changing "pick the biggest N bundles" to "pick the smallest N bundles" to unload?
   It's better you could come up with more solid reasons to do so.
   Using the smallest still won't avoid repeated unloading completely.




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