ethqunzhong opened a new issue, #20734: URL: https://github.com/apache/pulsar/issues/20734
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version latest master ### Minimal reproduce step topicLevelPolicies/nsLevelPolicies created with deafult `managedLedgerOffloadMaxThreads=2` and `managedLedgerOffloadPrefetchRounds=1` but the admin-api `set-offload-policies` not support adjust these two fileds. Therefore, these two parameters are always default values. for reason: policies level priority: topic > namespace > broker Even if we configure new values in broker.conf, they will still be overwritten by default values in ns/topic offloadpolicies when executing the merge logic. **These two values can never be modified, which is unexpected. It is reasonable and necessary to adjust these parameter values by configuring relevant parameters in broker.conf.** reproduce: write a unit-test in OffloadPoliciesTest#mergeTest set brokerOffloadMaxThreads=20 set brokerOffloadPrefetchRounds = 10 create offloadPolicies by `OffloadPoliciesImpl offloadPolicies = OffloadPoliciesImpl.mergeConfiguration(topicLevelPolicies, nsLevelPolicies, brokerProperties);` ### What did you expect to see? unit passed and managedLedgerOffloadMaxThreads=20 managedLedgerOffloadPrefetchRounds=10 ### What did you see instead? `Assert.assertEquals(offloadPolicies.getManagedLedgerOffloadMaxThreads(), brokerOffloadMaxThreads);` <img width="1363" alt="image" src="https://github.com/apache/pulsar/assets/16517186/6dcac126-933f-486b-bbf3-83c8871f8a5d"> `Assert.assertEquals(offloadPolicies.getManagedLedgerOffloadPrefetchRounds(),brokerOffloadPrefetchRounds);` <img width="974" alt="image" src="https://github.com/apache/pulsar/assets/16517186/7499786a-9a1e-471b-b8fd-66b67818a8f2"> ### Anything else? _No response_ ### 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]
