Hi, Heesung Sohn After PIP https://github.com/apache/pulsar/issues/19239 is implemented, the topic name includes `-partition-` keywords without metadata that will be rejected. :)
Best, Mattison On 24 Aug 2023 at 07:58 +0800, Heesung Sohn <heesung.s...@streamnative.io.invalid>, wrote: > Hi dev, > > I am proposing a behavior change in Pulsar, and I wonder if this is > acceptable as a "bug fix." > > PR: https://github.com/apache/pulsar/pull/20554 > > Given that the topic-auto-creation is enabled, > When a partitioned topic is deleted with force=true, the > existing clients(consumers and producers) automatically > create(recover) topic partitions after reconnecting. This results in an odd > metadata inconsistent state, where there is > no partitioned topic, but its topic partitions exist -- so the partitioned > topic creation fails. > I think this behavior is counter-intuitive and appears to be a bug(but this > behavior is asserted by unit tests such as > testPartitionedTopicAutoCreation, testCompatibilityWithPartitionKeyword) > Please check the description in the PR to see the repro steps. > > > Proposals > > Option1 : > I think, ideally, we shouldn't allow this automatic topic partition > creation from the clients when the root topic(the partitioned topic) is > already deleted. > To create the topic partitions, the admin needs to create the partitioned > topic again. > > Option2 : > Upon recreating topic partitions, it should recreate the corresponding > partitioned topic, if not there, to make it consistent. > > > Thanks, > Heesung