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 2022/06/16 16:04:38 UTC

[GitHub] [pulsar] HQebupt opened a new pull request, #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

HQebupt opened a new pull request, #16097:
URL: https://github.com/apache/pulsar/pull/16097

   ### Motivation
   correct the semantics of loadBalancerHistoryResourcePercentage like `loadBalancerBrokerOverloadedThresholdPercentage` and  `loadBalancerBrokerThresholdShedderPercentage`, 
   https://github.com/apache/pulsar/blob/bb0bfb904da90030c171ceac0159142d2bdb51b7/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java#L2026-L2038
   
   
   ### Modifications
   correct the semantics of loadBalancerHistoryResourcePercentage 
   
   ### Verifying this change
   
   - [x]  Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   If `yes` was chosen, please highlight the changes
   
   - Dependencies (does it add or upgrade a dependency): (no)
   - The public API: (no)
   - The schema: (no)
   - The default values of configurations: (no)
   - The wire protocol: (no)
   - The rest endpoints: (no)
   - The admin cli options: (no)
   - Anything that affects deployment: (no)
   
   ### Documentation
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   - [x] `doc-not-needed` 
   


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


[GitHub] [pulsar] Jason918 commented on a diff in pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
Jason918 commented on code in PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#discussion_r903252691


##########
conf/broker.conf:
##########
@@ -1181,7 +1181,7 @@ loadBalancerMsgThroughputMultiplierDifferenceShedderThreshold=4
 
 # When calculating new resource usage, the history usage accounts for.
 # It only takes effect in the ThresholdShedder strategy.
-loadBalancerHistoryResourcePercentage=0.9
+loadBalancerHistoryResourcePercentage=90

Review Comment:
   This is a break change. We better not do this.



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


[GitHub] [pulsar] HQebupt closed pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
HQebupt closed pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage
URL: https://github.com/apache/pulsar/pull/16097


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


[GitHub] [pulsar] HQebupt commented on a diff in pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
HQebupt commented on code in PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#discussion_r902493985


##########
conf/broker.conf:
##########
@@ -1181,7 +1181,7 @@ loadBalancerMsgThroughputMultiplierDifferenceShedderThreshold=4
 
 # When calculating new resource usage, the history usage accounts for.
 # It only takes effect in the ThresholdShedder strategy.
-loadBalancerHistoryResourcePercentage=0.9
+loadBalancerHistoryResourcePercentage=90

Review Comment:
   This change lacks the compatibility. The new version can only use the new configuration file, the old version use the old one.



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


[GitHub] [pulsar] HQebupt commented on a diff in pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
HQebupt commented on code in PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#discussion_r899737004


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2050,7 +2050,7 @@ public class ServiceConfiguration implements PulsarConfiguration {
             category = CATEGORY_LOAD_BALANCER,
             doc = "Resource history Usage Percentage When adding new resource usage info"
     )
-    private double loadBalancerHistoryResourcePercentage = 0.9;
+    private int loadBalancerHistoryResourcePercentage = 90;

Review Comment:
   Can we keep the field double type ?



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


[GitHub] [pulsar] Jason918 commented on a diff in pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
Jason918 commented on code in PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#discussion_r899697083


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2050,7 +2050,7 @@ public class ServiceConfiguration implements PulsarConfiguration {
             category = CATEGORY_LOAD_BALANCER,
             doc = "Resource history Usage Percentage When adding new resource usage info"
     )
-    private double loadBalancerHistoryResourcePercentage = 0.9;
+    private int loadBalancerHistoryResourcePercentage = 90;

Review Comment:
   This change is not backward compatible.



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


[GitHub] [pulsar] Jason918 commented on a diff in pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
Jason918 commented on code in PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#discussion_r900689195


##########
conf/broker.conf:
##########
@@ -1181,7 +1181,7 @@ loadBalancerMsgThroughputMultiplierDifferenceShedderThreshold=4
 
 # When calculating new resource usage, the history usage accounts for.
 # It only takes effect in the ThresholdShedder strategy.
-loadBalancerHistoryResourcePercentage=0.9
+loadBalancerHistoryResourcePercentage=90

Review Comment:
   You have to consider the case when new version broker using broker.conf in previous version.



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


[GitHub] [pulsar] HQebupt commented on pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
HQebupt commented on PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#issuecomment-1161610480

   /pulsarbot run-failure-checks


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


[GitHub] [pulsar] HQebupt commented on pull request #16097: [improve][broker]correct the semantics of loadBalancerHistoryResourcePercentage

Posted by GitBox <gi...@apache.org>.
HQebupt commented on PR #16097:
URL: https://github.com/apache/pulsar/pull/16097#issuecomment-1158399452

   /pulsarbot run-failure-checks


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