Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Partitioned topic deletion by topic GC #22471

Open
2 of 3 tasks
mukesh154 opened this issue Apr 10, 2024 · 3 comments
Open
2 of 3 tasks

[Bug] Partitioned topic deletion by topic GC #22471

mukesh154 opened this issue Apr 10, 2024 · 3 comments
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@mukesh154
Copy link
Contributor

mukesh154 commented Apr 10, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Read release policy

  • 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

3.1.2

Minimal reproduce step

  • Fire up a Pulsar cluster with the "inactive delete" options enabled:
brokerDeleteInactiveTopicsEnabled=true
brokerDeleteInactiveTopicsFrequencySeconds=60
brokerDeleteInactiveTopicsMode=delete_when_no_subscriptions
  • Create a namespace with inactive topic policy deleted after 60 seconds. This is a default behaviour.

  • Create a partitioned topic via pulsar-admin

  • Produce a few messages to the partitioned topic. Do not create any subscription

  • Check after a few minutes to make sure if the partitions are deleted or not and check the partitioned topic self still there or not.

What did you expect to see?

The topic should be deleted along with the partitions because they weren't being used.

What did you see instead?

The topic is never cleaned up only partitions are deleted. If you list the topics with the pulsar-admin tool the topic won't be listed, but when you try to create another topic with the same name it will say topic already exists.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@mukesh154 mukesh154 added the type/bug The PR fixed a bug or issue reported a bug label Apr 10, 2024
@dao-jun dao-jun self-assigned this Apr 15, 2024
@dao-jun
Copy link
Member

dao-jun commented Apr 15, 2024

it seems not a bug, please see ServiceConfiguration#brokerDeleteInactivePartitionedTopicMetadataEnabled

@dao-jun dao-jun removed their assignment Apr 15, 2024
@zzzming
Copy link
Contributor

zzzming commented Apr 15, 2024

May not be a bug. Check the broker.conf, this should be true but the default is false.

# Metadata of inactive partitioned topic will not be cleaned up automatically by default.
# Note: If `allowAutoTopicCreation` and this option are enabled at the same time,
# it may appear that a partitioned topic has just been deleted but is automatically created as a non-partitioned topic.
brokerDeleteInactivePartitionedTopicMetadataEnabled=false

@mukesh154
Copy link
Contributor Author

mukesh154 commented Apr 16, 2024

It seems to be working with enabling the flag on broker.conf:
brokerDeleteInactivePartitionedTopicMetadataEnabled=true

The same flag is not there on standalone.conf and on adding manually, it is not working as expected.
So, it only works with k8s deployment not on standalone.

Thanks @dao-jun @zzzming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

3 participants