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/04/12 13:05:17 UTC

[GitHub] [pulsar] lhotari opened a new pull request #10196: [Broker] Close namespace clients when PulsarService is closed

lhotari opened a new pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196


   ### Motivation
   
   The broker leaks some PulsarClient instances since the PulsarClient instances created in NamespaceService don't get closed.
   
   ### Modifications
   
   Add handling for closing PulsarClient instances created in NamespaceService. A similar logic for closing is used as there is currently for [closing the PulsarClients of replication clients](https://github.com/apache/pulsar/blob/5fcd0d18f8b33474fd8fb5faa3e2330fd88c554a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L680-L686).


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



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819683670


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819367888


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819837744


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818395285


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-820026080


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819130752


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819929967


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819288475






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



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818088414


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818952759


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818637542


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-819216278


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818474740


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818644114


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818233820


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818463557


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818939387


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818653786


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on a change in pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
##########
@@ -1388,4 +1391,15 @@ public void registerOwnedBundles() {
             }
         });
     }
+
+    @Override
+    public void close() throws IOException {

Review comment:
       @eolivelli  good point. I'll switch to use `AutoCloseable`.




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



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818655336


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli merged pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


   


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



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #10196: [Broker] Close namespace clients when PulsarService is closed

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



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
##########
@@ -1388,4 +1391,15 @@ public void registerOwnedBundles() {
             }
         });
     }
+
+    @Override
+    public void close() throws IOException {

Review comment:
       Can we remove the 'throws' clause?
   We can also move to AutoCloseable instead of Closeable




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



[GitHub] [pulsar] lhotari removed a comment on pull request #10196: [Broker] Close namespace clients when PulsarService is closed

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10196:
URL: https://github.com/apache/pulsar/pull/10196#issuecomment-818688218


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org