codelipenghui opened a new pull request #5919: Fix topic owner check while namespace bundles cache invalidate. URL: https://github.com/apache/pulsar/pull/5919 ### Motivation Currently, when namespace bundles split happens, namespace bundles cache will be invalidated. If producer or consumer try to connect to a topic which belongs to an exists bundle and the broker owned the exists bundle invalidate namespace bundles cache, producer and consumer will always connect failed with error log: ``` org.apache.pulsar.broker.service.BrokerServiceException$ServiceUnitNotReadyException: Namespace bundle for topic (persistent://platform/im/operationLog.addSession-partition-0) not served by this instance. Please redo the lookup. Request is denied: namespace=platform/im ``` Following steps can reproduce the problem: 1. Start a pulsar cluster(>= 2 brokers) 2. Create a namespace with some bundles(>= 2), bundles need be owned by different broker 3. Create some topics and do lookup request Suppose after above steps, you have 2 topic(topic-1 with bundle-1 owned by broker-1 and topic-2 with bundle-2 owned by broker-2) Now, split bundle-1 and then create a PulsarClient using service url of broker-1 as pulsar url, then create a consumer, ServiceUnitNotReadyException will appear. I have write a unit test for reproduce this issue on master branch and cover the change of this PR. ### Verifying this change Added unit tests ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* - Dependencies (does it add or upgrade a dependency): (no) - The public API: (no) - The schema: (no) - The default values of configurations: (no) - The wire protocol: (no) - The rest endpoints: (no) - The admin cli options: (no) - Anything that affects deployment: (no) ### Documentation - Does this pull request introduce a new feature? (no)
---------------------------------------------------------------- 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] With regards, Apache Git Services
