TakaHiro0208 opened a new pull request, #15217: URL: https://github.com/apache/pulsar/pull/15217
### Motivation I encounter the same problem as #11682 described, and i notice two pr for it, #10374 and #11683 But I think they still remain problems. Actually internalUpdatePartitionedTopic consist of three part: 1. tryCreatePartitionsAsync(): create the topic newPartition on metadataStore such as zk 2. createSubscriptions(): creates subscriptions for new partitions of existing partitioned-topics 3. updatePartitionedTopicAsync(): update the partitioned-topic metadata(update partition num to newPartition) Suppose there are subscriptions in a partitioned-topic and we want to update its partition. If part 1, 2 succeed, part 3 failed, it need to clean up managed-ledger znode. But it would throw zookeeper Directory not empty exception when clean-up, since znode would has successfully created subscription children node.  And when we retrying updatePartition again, it would throw the below error because part 2 complete  So we need to retry updatePartition again with "force=true". The "Subscription already exists" error would be catch, and it complete the updatePartition operation, while permanently skip the part 3. ### Modifications After catch the "Subscription already exists" error, do updatePartitionedTopicAsync() operation ### discussions When adding 'force=true' , the managed-ledger znode clean up operation seems not neccessary and can be removed? ### 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 Check the box below or label this PR directly. Need to update docs? - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x ] `no-need-doc` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-added` (Docs have been already added) -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org