-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[pulsar-broker] Fix delete empty namespace with partitioned-topic metadata #15141
base: master
Are you sure you want to change the base?
Conversation
@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs? |
@rdhabalia is this a bug fix and we do not need to update docs? |
this PR doesn't need doc update. |
The pr had no activity for 30 days, mark with Stale label. |
The pr had no activity for 30 days, mark with Stale label. |
@rdhabalia LGTM but the PR needs rebasing |
}); | ||
admin.namespaces().deleteNamespace(namespace); | ||
try { | ||
admin.namespaces().getPolicies(namespace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be an exception, so a fail()
should be added here
@rdhabalia Please add the following content to your PR description and select a checkbox:
|
Motivation
Right now, broker gives below error while deleting empty namespace without any topic under the namespace but namespace was having partitioned-topic metadata.
Modification
It's because broker was incorrectly assuming topic existence by checking partitioned-topic metadata. delete-admin API cleans up partitioned-metadata after successfully deleting namespace and it it should not incorrectly depend on partitioned-metadata check. this issue is already fixed with forcefully delete-ns admin-api and delete-admin also needs the same fix.
Result
User can delete namespace after successfully deleting all topics under the namespace.