[GitHub] [pulsar] lhotari commented on a change in pull request #10384: [Broker] Fix various issues when using preciseTopicPublishRateLimiterEnable=true

2021-05-17 Thread GitBox


lhotari commented on a change in pull request #10384:
URL: https://github.com/apache/pulsar/pull/10384#discussion_r633318908



##
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
##
@@ -425,6 +425,13 @@ public void removeProducer(Producer producer) {
 
 replicators.forEach((cluster, replicator) -> 
futures.add(replicator.disconnect()));
 producers.values().forEach(producer -> 
futures.add(producer.disconnect()));
+if (topicPublishRateLimiter instanceof AutoCloseable) {

Review comment:
   @eolivelli this is now resolved. PTAL




-- 
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:
us...@infra.apache.org




[GitHub] [pulsar] lhotari commented on a change in pull request #10384: [Broker] Fix various issues when using preciseTopicPublishRateLimiterEnable=true

2021-05-17 Thread GitBox


lhotari commented on a change in pull request #10384:
URL: https://github.com/apache/pulsar/pull/10384#discussion_r633318908



##
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
##
@@ -425,6 +425,13 @@ public void removeProducer(Producer producer) {
 
 replicators.forEach((cluster, replicator) -> 
futures.add(replicator.disconnect()));
 producers.values().forEach(producer -> 
futures.add(producer.disconnect()));
+if (topicPublishRateLimiter instanceof AutoCloseable) {

Review comment:
   @eolivelli this is now resolved. PTAL




-- 
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:
us...@infra.apache.org




[GitHub] [pulsar] lhotari commented on a change in pull request #10384: [Broker] Fix various issues when using preciseTopicPublishRateLimiterEnable=true

2021-05-14 Thread GitBox


lhotari commented on a change in pull request #10384:
URL: https://github.com/apache/pulsar/pull/10384#discussion_r632344868



##
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PrecisPublishLimiter.java
##
@@ -71,31 +80,63 @@ public void update(Policies policies, String clusterName) {
 : null;
 this.update(maxPublishRate);
 }
+
 public void update(PublishRate maxPublishRate) {
-if (maxPublishRate != null

Review comment:
   I think that would make the logic a bit complicated without much gains.




-- 
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:
us...@infra.apache.org




[GitHub] [pulsar] lhotari commented on a change in pull request #10384: [Broker] Fix various issues when using preciseTopicPublishRateLimiterEnable=true

2021-05-14 Thread GitBox


lhotari commented on a change in pull request #10384:
URL: https://github.com/apache/pulsar/pull/10384#discussion_r632344627



##
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java
##
@@ -425,6 +425,13 @@ public void removeProducer(Producer producer) {
 
 replicators.forEach((cluster, replicator) -> 
futures.add(replicator.disconnect()));
 producers.values().forEach(producer -> 
futures.add(producer.disconnect()));
+if (topicPublishRateLimiter instanceof AutoCloseable) {

Review comment:
   yes, I guess it makes sense in this case since PublishRateLimiter is an 
internal interface and it's fine to change it.




-- 
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:
us...@infra.apache.org