Hi all ### Background The PR https://github.com/apache/pulsar/pull/18518 added to MetadataStore the support for using the sync() API and added refreshAndGetAsync() to MetadataCache.
The PR https://github.com/apache/pulsar/pull/21063 fixed a bug that Broker will create both non-partitioned topic and partitioned topic at the same time when users call `pulsar-admin create-partitioned-topic <new topic>`. And this PR relies on the PR #18518. ### Cherry-pick #18518 into branch-2.10 and branch-2.11 Since the bug which https://github.com/apache/pulsar/pull/21063 fixed causes message may be mistakenly sent to the non-partitioned topic, but no consumer consumes it, which means that the message is lost from the user's point of view. So this is an important fix. Since this PR 21063 relies on PR #18518, I want to cherry-pick #18518 into branch 2.10 and branch 2.11. Thanks Yubiao Feng