3286360470 opened a new issue, #17086: URL: https://github.com/apache/pulsar/issues/17086
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version OS version: CentOS Linux release 7.4.1708 Pulsar version: 2.9.2 ### Minimal reproduce step ` public class TopicLevelOffloadPoliciesTool { public static void main(String[] args) throws PulsarClientException, PulsarAdminException { // 1. construct Pulsar Admin client PulsarAdmin pulsarAdmin = PulsarAdmin.builder().serviceHttpUrl("").authentication("", "").build(); // 2. construct OffloadPoliciesImpl OffloadPoliciesImpl.OffloadPoliciesImplBuilder offloadPoliciesImplBuilder = new OffloadPoliciesImpl.OffloadPoliciesImplBuilder(); OffloadPoliciesImpl offloadPolicies = offloadPoliciesImplBuilder .fileSystemURI("") .fileSystemProfilePath("") .managedLedgerOffloadDriver("") .managedLedgerOffloadThresholdInBytes(11111L).build(); // 3. call setOffloadPolicies method to set topic level offload policies pulsarAdmin.topicPolicies().setOffloadPolicies("", offloadPolicies); } } ` ### What did you expect to see? When I call the pusarAdmin.topicPolicies().setOffloadPolicies(), the Pulsar Broker should update the offload policies for topic normally, and when pulsar client attach the offload threshold, then Pulsar Broker will trigger the offload。 ### What did you see instead? 1. Fist, When I call pusarAdmin.topicPolicies().setOffloadPolicies(), Pulsar Broker will pint the exception: ` org.apache.pulsar.broker.service.BrokerServiceException$ServiceUnitNotReadyException: Namespace bundle for topic (persistent://ys/ys1/topic1-partition-1) not served by this instance. Please redo the lookup. Request is denied: namespace=ys/ys1 ` Pulsar client also print server 500 error 2. And when I get topic level offload policies use command, there are will show the offload policies just now, But when the Pulsar Client trigger Pulsar Broker to offloading, there are will be just some partitions trigger offload. ### Anything else? 1. 下图圈出来的部分,在更新分区级的策略时候会去校验所有分区是否是当前broker管理的,对于分区分布在不同broker上的topic来说,这里一定就会出现异常: org.apache.pulsar.broker.service.BrokerServiceException$ServiceUnitNotReadyException: Namespace bundle for topic (persistent://ys/ys1/topic1-partition-1) not served by this instance. Please redo the lookup. Request is denied: namespace=ys/ys1  ### 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]
