[pulsar-broker] Fix delete empty namespace with partitioned-topic metadata - #15141
Open
rdhabalia wants to merge 1 commit into
Open
[pulsar-broker] Fix delete empty namespace with partitioned-topic metadata#15141rdhabalia wants to merge 1 commit into
rdhabalia wants to merge 1 commit into
Conversation
rdhabalia
requested review from
315157973,
codelipenghui,
eolivelli,
jiazhai,
merlimat and
sijie
April 12, 2022 22:08
|
@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs? |
Member
|
@rdhabalia is this a bug fix and we do not need to update docs? |
Contributor
Author
|
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. |
dlg99
approved these changes
Aug 30, 2022
4 tasks
Contributor
|
@rdhabalia LGTM but the PR needs rebasing |
315157973
reviewed
Sep 7, 2022
| }); | ||
| admin.namespaces().deleteNamespace(namespace); | ||
| try { | ||
| admin.namespaces().getPolicies(namespace); |
Contributor
There was a problem hiding this comment.
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.