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/07/23 16:34:31 UTC

[GitHub] [pulsar] danielsinai opened a new pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

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


   ## Master Issue: #11351
   
   ### Motivation
   
   This PR is fixing the 1,2 problems as described in #11351.
   
   There was a bigger Pull request that I published #11352, but I closed it in due to being too big and lacked explaination for what is actually solves
   
   ### Reproduce
   - Allow precise rate limiting
   - Create a topic
   - Limit publish rate of messages per second to 10
   - With producer perf write 100 messages per second
   
     Results after this PR:
      
   ![image](https://user-images.githubusercontent.com/51213812/126812923-91bb827c-246d-451d-8f25-343bb2c1dca0.png)
   
   befoe this PR precise publishRate limiting wasn't taking effect at all
   ### Modifications
   
   In order to solve the current problems, there are 2 modifications
   
   1. Using IsDispatchRateLimiting in precise publish rate limiter as well (in order to starve the producer)
   2. Checking if there are available permits before resetting the read from the connection again
   
   ### Verifying this change
   
   Already covered by current tests.
   
   ### 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


-- 
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] 315157973 commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
315157973 commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676353305



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PublishRateLimiterTest.java
##########
@@ -104,9 +104,13 @@ public void testPrecisePublishRateLimiterAcquire() throws Exception {
 
         // tryAcquire msgSizeInBytes exceeded
         assertFalse(precisPublishLimiter.tryAcquire(10, 101));
-        Thread.sleep(1100);
+        Thread.sleep(2100);

Review comment:
       We can use reflection.
   Stop the scheduled task first
   private ScheduledFuture<?> renewTask;




-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676315712



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PublishRateLimiterTest.java
##########
@@ -104,9 +104,13 @@ public void testPrecisePublishRateLimiterAcquire() throws Exception {
 
         // tryAcquire msgSizeInBytes exceeded
         assertFalse(precisPublishLimiter.tryAcquire(10, 101));
-        Thread.sleep(1100);
+        Thread.sleep(2100);

Review comment:
       I can change it, didn't want to touch the current implementation too much.
   
   But will do 👍🏾




-- 
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] danielsinai commented on pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#issuecomment-888057868


   @315157973 Seems like everything passed 👌😄


-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r677262895



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +271,15 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        // release the back-pressure by applying the rateLimitFunction only when there are available permits
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       is that still relevant?
   And may you review the test refactor please?




-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676317299



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +271,15 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        // release the back-pressure by applying the rateLimitFunction only when there are available permits
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       It is necessary, without it every renew call the function will release the throttle.
   
   Not having it defeats the whole purpose of throttling a connection.




-- 
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] lhotari commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r675741825



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +267,14 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       This seems to make sense. Please add some comments here explaining the logic.




-- 
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] danielsinai commented on pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#issuecomment-886206923


   The failed test actually found a bug that the first tryAcquire will always pass because the condition is running before the acquiredPermits changed, and that will let the producer to write 2x above the limit in the first try.
   
   In addition there are some tests that should failed like the test that fills all the permits in the first try - currently it asserting to true but actually we should assert it to false in order to throttle the producer in the first time the maximum permits are set.
   
   Ill publish a fix soon


-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676026166



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +267,14 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       Yea Ill add a comment.
   
   And actually i didn't give it much thought but when I'm thinking about it the rateLimitFunction is a callback that lets the outer scope access to the renew function, I don't think that we should use this property without knowing exactly what expected to be happening.
   
   I believe that checking whether there are available permits is the reasonable condition here because we would want to let the outer scope a way to run something when there are any available permits, and it doesn't really depend on the class property.
   
   If it sets to false we can assume the user of the rateLimiter wants the state to be reset every time window otherwise he probably want back-pressuring something.




-- 
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] sijie merged pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

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


   


-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676341281



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PublishRateLimiterTest.java
##########
@@ -104,9 +104,13 @@ public void testPrecisePublishRateLimiterAcquire() throws Exception {
 
         // tryAcquire msgSizeInBytes exceeded
         assertFalse(precisPublishLimiter.tryAcquire(10, 101));
-        Thread.sleep(1100);
+        Thread.sleep(2100);

Review comment:
       Would you like me to turn the rateLimiters within the precisPublishLimiter to public in order to call the renew function?
   
   Im afraid that it can result others to try and access the rateLimiters state, Oppositely to OOP mutable non-shared state approach




-- 
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] danielsinai commented on pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#issuecomment-887234637


   /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] 315157973 commented on pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#issuecomment-888031613


   Thanks. Let's wait for CI to pass


-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676112146



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +267,14 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       Done




-- 
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] danielsinai commented on pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#issuecomment-888030683


   @315157973 yes ofc done 👍🏾


-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r677262895



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +271,15 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        // release the back-pressure by applying the rateLimitFunction only when there are available permits
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       is that still relevant?
   and can you also review the test refactor?




-- 
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] 315157973 commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
315157973 commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676249886



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PublishRateLimiterTest.java
##########
@@ -104,9 +104,13 @@ public void testPrecisePublishRateLimiterAcquire() throws Exception {
 
         // tryAcquire msgSizeInBytes exceeded
         assertFalse(precisPublishLimiter.tryAcquire(10, 101));
-        Thread.sleep(1100);
+        Thread.sleep(2100);

Review comment:
       This is a potential flaky test, and we cannot guarantee that it will be scheduled after 2100ms. Manual control of renew should be better

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +271,15 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        // release the back-pressure by applying the rateLimitFunction only when there are available permits
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       I'm not sure if this is necessary
   Changed existing behavior




-- 
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] lhotari commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r675753931



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +267,14 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       I'd assume that the condition would need to handle the case where `isDispatchOrPrecisePublishRateLimiter` is `false`. Did you think about that?




-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676356713



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PublishRateLimiterTest.java
##########
@@ -104,9 +104,13 @@ public void testPrecisePublishRateLimiterAcquire() throws Exception {
 
         // tryAcquire msgSizeInBytes exceeded
         assertFalse(precisPublishLimiter.tryAcquire(10, 101));
-        Thread.sleep(1100);
+        Thread.sleep(2100);

Review comment:
       Oh sounds good, will do thanks for clarifying 




-- 
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] lhotari commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r675753931



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -257,14 +267,14 @@ public synchronized TimeUnit getRateTimeUnit() {
     }
 
     synchronized void renew() {
-        acquiredPermits = isDispatchRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
+        acquiredPermits = isDispatchOrPrecisePublishRateLimiter ? Math.max(0, acquiredPermits - permits) : 0;
         if (permitUpdater != null) {
             long newPermitRate = permitUpdater.get();
             if (newPermitRate > 0) {
                 setRate(newPermitRate);
             }
         }
-        if (rateLimitFunction != null) {
+        if (rateLimitFunction != null && this.getAvailablePermits() > 0) {

Review comment:
       I'd assume that the condition would need to handle the case where `isDispatchOrPrecisePublishRateLimiter` is `false`.  
   It seems that `rateLimitFunction.apply` would never be called in that case.
   Did you think about that?




-- 
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] danielsinai commented on a change in pull request #11446: [issue #13351] Solving precise rate limiting does not takes effect

Posted by GitBox <gi...@apache.org>.
danielsinai commented on a change in pull request #11446:
URL: https://github.com/apache/pulsar/pull/11446#discussion_r676505426



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PublishRateLimiterTest.java
##########
@@ -104,9 +104,13 @@ public void testPrecisePublishRateLimiterAcquire() throws Exception {
 
         // tryAcquire msgSizeInBytes exceeded
         assertFalse(precisPublishLimiter.tryAcquire(10, 101));
-        Thread.sleep(1100);
+        Thread.sleep(2100);

Review comment:
       Done 👍🏾




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