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 2019/09/09 13:12:10 UTC

[GitHub] [pulsar] massakam opened a new pull request #5155: [pulsar-broker] Close RateLimiter instance

massakam opened a new pull request #5155: [pulsar-broker] Close RateLimiter instance
URL: https://github.com/apache/pulsar/pull/5155
 
 
   ### Motivation
   
   As a result of analyzing the heap dump of our broker server, we found that the number of `RateLimiter` instances is very large.
   ![rate_limiter_instances](https://user-images.githubusercontent.com/22543882/64531808-3f542d80-d34b-11e9-9cb5-778dcdbac237.png)
   
   `RateLimiter` instances that are no longer used should be closed, but do not seem to be closed, for example, when a subscription is deleted. As a result, I think that `RateLimiter#renewTask` keeps running without being canceled and GC is not performed.
   https://github.com/apache/pulsar/blob/d9c0a1054310e9428007d016895d4174b0d20f89/pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java#L56
   
   ### Modifications
   
   Whenever a topic, subscription or replicator is closed or deleted, RateLimiter is also closed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services