wjhypo opened a new pull request #9878: URL: https://github.com/apache/druid/pull/9878
Fixes #9876. ### Description Currently when brokers use custom priority list, all the priorities of existing tiers need to be explicitly specified in `druid.broker.select.tier.custom.priorities`, otherwise NPE will be thrown when brokers update their server views next time there's segment movement happening in historical nodes. This PR fixes the NPE by assigning and clearly documenting default behaviors to all possible scenarios of the input of the config `druid.broker.select.tier.custom.priorities`: the config only has effect if `druid.broker.select.tier` is set to `custom`. If `druid.broker.select.tier` is set to `custom` but this config is not specified, the effect is the same as `druid.broker.select.tier` set to `highestPriority`. Any of the integers in this config can be ignored if there's no corresponding tiers with such priorities. Tiers with priorities explicitly specified in this config always have higher priority than those not and those not specified fall back to use `highestPriority` strategy among themselves. There should be no backward compatibility issue because before this change, there is NPE in front. <hr> This PR has: - [x] been self-reviewed. - [x] added documentation for new or modified features or behaviors. - [x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links. - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml) - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader. - [x] added unit tests or modified existing tests to cover new code paths. - [ ] added integration tests. - [x] been tested in a test Druid cluster. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
