labuladong opened a new issue, #20753:
URL: https://github.com/apache/pulsar/issues/20753

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Motivation
   
   When Pulsar undergoes a graceful shutdown, it unloads all topics, but there 
is no limit on the unloading rate. As a result, during a rolling upgrade, the 
broker cluster might generate a large volume of lookup requests in a short 
period, which could affect the service of the broker. Implementing a limit on 
the unload rate would make the upgrade process smoother.
   
   ### Solution
   
   This issue has been previously raised in a pull request 
https://github.com/apache/pulsar/pull/14114 and a solution was proposed by 
adding an unload interface with concurrency control for admin CLI.
   
   However, the current broker graceful shutdown doesn't use this interface. 
Hence, my proposal is pretty straightforward:
   
   1. Add a **dynamic** config named `brokerShutdownMaxBundleUnloadPerMinute`  
to the Pulsar broker to control the concurrency of unloading.
   
   2. Modify [this 
code](https://github.com/apache/pulsar/blob/7636e8989f4d3fc24fce69a356d54e1c550945ed/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java#L557)
 to use [this 
function](https://github.com/apache/pulsar/blob/7636e8989f4d3fc24fce69a356d54e1c550945ed/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L790-L791)
 with the concurrency parameter for unloading.
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   mail list: https://lists.apache.org/thread/7f5f9gn7qq86hstrkw5oz51g0rxrqq37
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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