Pulsar: Created a partitioned topic and a non-partitioned topic with same name

Created on 25 Jan 2019  ·  2Comments  ·  Source: apache/pulsar

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:

  1. Start to produce data:
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.

  1. create a partitioned topic with same name:(this in my test will not success, but in the online environment, it got success)
./bin/pulsar-admin topics  create-partitioned-topic  persistent://my-tenant/my-namespace/my-topic-test -p 20
  1. Could consume data produced by this command:
./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
image

typbug

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 -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.

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings