pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

Pulsar topic auto deletion not work

Open river1017 opened this issue 1 year ago • 5 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

Version 2.0

Minimal reproduce step

1.Edit pulsar broker.conf, add the following items:

brokerDeleteInactiveTopicsEnabled: true
brokerDeleteInactiveTopicsMode: delete_when_no_subscriptions
brokerDeleteInactiveTopicsMaxInactiveDurationSeconds: 600

aaa

  1. Restart Pulsar broker

  2. Add a topic with no subscriptions

  3. After 600s, we can still query the topic by using admin API

What did you expect to see?

The topic can be deleted

What did you see instead?

The topic still exists

Anything else?

No response

Are you willing to submit a PR?

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

river1017 avatar May 15 '24 10:05 river1017

Please report in English. @river1017 would you be able to translate the issue report? thanks

lhotari avatar May 15 '24 11:05 lhotari

Please report in English. @river1017 would you be able to translate the issue report? thanks

@lhotari I translated it

dao-jun avatar May 15 '24 12:05 dao-jun

it seems not an issue, try set brokerDeleteInactivePartitionedTopicMetadataEnabled to true

dao-jun avatar May 16 '24 07:05 dao-jun

it seems not an issue, try set brokerDeleteInactivePartitionedTopicMetadataEnabled to true

Thanks for the answer, but I set brokerDeleteInactivePartitionedTopicMetadataEnabled and then restarted pulsar but it doesn't seem to work.Ten minutes after restarting, I could still get the topic without subscribers from the interface. 1716126757762

river1017 avatar May 19 '24 13:05 river1017

There's a limitation in the deleting inactive topics when it comes to completely unused topics. If the namespace bundle of the topic isn't active, the topics won't get deleted.

lhotari avatar May 31 '24 12:05 lhotari