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/01/24 03:06:57 UTC

[GitHub] [pulsar] hangc0276 opened a new pull request #13914: Fix arithmetic exception for uniform load shedder

hangc0276 opened a new pull request #13914:
URL: https://github.com/apache/pulsar/pull/13914


   ### Motivation
   For a new joined broker, it doesn't has any message and throughput. It will lead to `minMsgRate` or `minThroughputRate` to 0, and cause arithmetic exception when executing the following code.
   ```java
   double msgRateDifferencePercentage = ((maxMsgRate.getValue() - minMsgRate.getValue()) * 100)
                   / (minMsgRate.getValue());
   double msgThroughputDifferenceRate = maxThroughputRate.getValue() / minThroughputgRate.getValue();
   ```
   
   ### Modification
   1. check whether `minMsgRate` and `minThroughputRate` is 0, if it is 0, set it to 1.0
   
   ### Documentation
   
   Check the box below or label this PR directly (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [x] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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] codelipenghui merged pull request #13914: Fix arithmetic exception for uniform load shedder

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #13914:
URL: https://github.com/apache/pulsar/pull/13914


   


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