mattisonchao opened a new pull request, #21463: URL: https://github.com/apache/pulsar/pull/21463
### Motivation Refactor method BrokerService#unloadServiceUnit to improve exception handling, logging and method call. ### Modifications - Add parameters NPE check - Ignore the exception of `topicCreationFuture` > We should ignore the exception from topic creation future. It will give the caller a precise exception related to topic closing. - throw `TimeoutException` when the method running timeout. > As a public method, we should let users decide what they want to do when the method runs timeout. Plus, I checked all the usage of this method and all of them ignore the exception directly. It shouldn't be a breaking change. ### Verifying this change - [x] Make sure that the change passes the CI checks. ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> -- 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]
