[fix][broker] Fix default bundle size used while setting bookie affinity - #20250
Conversation
Technoboy-
left a comment
There was a problem hiding this comment.
Could you also help change orElse to orElseGet at line 1713 and 1763
Even at those places and the remaining places where we are creating new LocalPolicies() we are not using the bundle size from the configuration. Should I change it to have the bundle size supplied by the user from the configuration? Should we do it in this PR or shall we create another bug and link it and fix them there? |
As this PR is already approved, created a new issue(#20278 ) for this and will push the changes in a new PR |
…ity (apache#20250) (cherry picked from commit 976c2c3)
Fixes #20194
Motivation
Motivation & Modifications:
After creating the namespace, if the bookie affinity is set for the namespaces, before setting the namespace policies, then for setting bookie Affinity currently the code directly uses the default bundle of size 1 instead of reading the configuration to get the default bundle size while creating the namespaces.
The change fixes that and uses the user-provided value from the broker configurations to set the bundles.
Verifying this change
The tests are already in place to create the bookie affinity group in
BrokerBookieIsolationTest.java. So Just added a check to get the bundle size that was missing earlier.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: