pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[Bug] [broker] Non persistent topic will be lost when it is unloaded.

Open hanmz opened this issue 1 year ago • 0 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Read release policy

  • [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version

ALL

Minimal reproduce step

  1. Start a pulsar broker.
  2. Create a non persistent topic, for example non-persistent://test-tenant/test-ns/test-topic
  3. Execute admin command: sh bin/pulsar-admin topics list test-tenant/test-ns, we will see this topic. image
  4. Execute admin command: sh bin/pulsar-admin topics unload non-persistent://test-tenant/test-ns/test-topic, we won't be able to see this topic.
  5. At this time, we execute the admin command: sh bin/pulsar-admin topics stats non-persistent://test-tenant/test-ns/test-topic. We will see the error log: Topic non-persistent://test-tenant/test-ns/test-topic not found image

What did you expect to see?

The topic should still exist when we unload.

What did you see instead?

The topic will be lost when it is unloaded.

Anything else?

If it is a partition topic, it can be re-created after unload it (whether the allowAutoTopicCreation switch is turned on or not). However, non-partition topics cannot be created if the switch for allowAutoTopicCreation is not turned on.

Are you willing to submit a PR?

  • [X] I'm willing to submit a PR!

hanmz avatar Jul 14 '24 11:07 hanmz