danielsinai opened a new pull request #11352:
URL: https://github.com/apache/pulsar/pull/11352


    
   Master Issue: #11351
   
   ### Motivation
   
   In order to fix multiple issues with preciseRateLimiting this PR separates 
RateLimiter into 2 implementations
   
   1. FixedWindowRateLimiter
   2. LeakeyBucketRateLimiter
   
   ### Modifications
   
   1. Created an abstract class of the current RateLimiter functionalities and 
added 2 extends classes that override the renew and tryAcquire methods
   
   2. Fixed precis Typo
   
   3. removed IsDispatchRateLimiter in RateLimiter and used the new LeakyBucket 
algorithm
   
   
   ### Verifying this change
   
   LeakyBucketRateLimiterTest
   FixedWindowRateLimiterTest
   
   I want to add more tests, but before I would love to get some feedback 
instead of implementing a lot of tests without reason
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies  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
   
   #### For contributor
   
   For this PR, do we need to update docs? Probably not, it is just fixing the 
current implementation
   
   BTW, That's my first PR into pulsar and I am not a strong JAVA programmer - 
would love to get some feedback and learn from this PR :)
   


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


Reply via email to