BewareMyPower opened a new pull request, #22708:
URL: https://github.com/apache/pulsar/pull/22708
### Motivation
There are many warn logs ("Empty selected broker for ownership") when
closing the last broker. However, this log should not be warn because it's
expected.
### Modifications
- Remove the warning log when `selectBroker` returns an empty optional
string because the following log "Overriding ownership" will reflect this case
by showing the state is changed from Owned to Free.
- Use a functional programming style to replace
`getOverrideInactiveBrokerStateData`, which uses Optional as a parameter. See
discussion here:
https://stackoverflow.com/questions/31922866/why-should-java-8s-optional-not-be-used-in-arguments
### 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 -->
### Matching PR in forked repository
PR in forked repository:
--
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]