nicoloboschi opened a new pull request, #17619:
URL: https://github.com/apache/pulsar/pull/17619

   ### Motivation
   
   In Pulsar shell when creating a new admin client (using the `admin` API) is 
created for each command. There are two considerations:
   - the admin client is never closed (memory and tcp cnxs leak)
   - the admin client should be reused when using the same config 
   
   ### Modifications
   * Refactored the pulsar-admin main class (`PulsarAdminTool`) in order to 
being able to compare configurations and decide to keep or destroy the current 
admin client
   
   The client is discarded when:
   1. You pass a inline parameter (e.g. `--admin-url`) that is different from 
the current one
   2. You change config (`config use ...`) without the comparison because a new 
`PulsarAdminTool` is created. This makes sense because when you change the 
config, you change the tenant or cluster.
   
   * Fixed another leak in for custom commands. They list of custom commands 
continues to grow for each command and it's never cleared
   
   
   - [x] `doc-not-needed` 


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