Describe the bug
Created a partitioned topic and a non-partitioned topic with same name, which should fail. but got success. reported by user @bilahepan
To Reproduce
This seems a race condition and not able to reproduce easily.
This is meet like this steps:
sudo -u docker ./bin/pulsar-client produce persistent://my-tenant/my-namespace/my-topic-test -m "hello-pulsar”
And this will create a non-partitioned topic automatically.
./bin/pulsar-admin topics create-partitioned-topic persistent://my-tenant/my-namespace/my-topic-test -p 20
./bin/pulsar-client produce persistent://my-tenant/my-namespace/my-topic-test -m "hello-pulsar-1”
```
but not able to consume data by:
./bin/pulsar-client produce persistent://my-tenant/my-namespace/my-topic-test-partition-10 -m "hello-pulsar"
```
Screenshots

This issue occurs in my production environment.
I am trying to force delete the non-partitioned topic.
./bin/pulsar-admin topics delete persistent://my-tenant/my-namespace/my-topic-test -f
but it doesn't work.
finally I restart the consumer cluster and the producer cluster.
while not restart the brokers.
partitioned topic disappeared, and it's working.
This has been fixed by #5148
Most helpful comment
This issue occurs in my production environment.
I am trying to force delete the non-partitioned topic.
./bin/pulsar-admin topics delete persistent://my-tenant/my-namespace/my-topic-test -fbut it doesn't work.
finally I restart the consumer cluster and the producer cluster.
while not restart the brokers.
partitioned topic disappeared, and it's working.