BewareMyPower opened a new pull request #12217:
URL: https://github.com/apache/pulsar/pull/12217


   ### Motivation
   
   In `PulsarService`, there's a built-in client used in many places, like 
topic compaction, system topics read/write. It could also be used in protocol 
handlers. Different with the manually created Pulsar client, it can read the 
configured authentication params and TLS related configs for broker-to-broker 
communication.
   
   However, it doesn't change the default `statsIntervalSeconds` config, which 
means each time a producer/consumer/reader is created, a stats recorder 
(`ProducerStatsRecorderImpl` or `ConsumerStatsRecorderImpl`) will be created, 
in which there's a Netty `TimerTask` that prints stats periodically (the 
default interval is 1 minute). If there're many producers/consumers/readers 
created by this built-in client, the unnecessary CPU usage will be high.
   
   ### Modifications
   
   Configure the `statsIntervalSeconds` with zero value to disable stats 
recorder.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.


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