Skip to content

[pulsar-broker] Fix delete empty namespace with partitioned-topic metadata - #15141

Open
rdhabalia wants to merge 1 commit into
apache:masterfrom
rdhabalia:ns_delete
Open

[pulsar-broker] Fix delete empty namespace with partitioned-topic metadata#15141
rdhabalia wants to merge 1 commit into
apache:masterfrom
rdhabalia:ns_delete

Conversation

@rdhabalia

Copy link
Copy Markdown
Contributor

Motivation

Right now, broker gives below error while deleting empty namespace without any topic under the namespace but namespace was having partitioned-topic metadata.

pulsar-admin namespaces delete prop/us-west/my-ns
Cannot delete non empty namespace

Reason: Cannot delete non empty namespace

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.

@rdhabalia rdhabalia added this to the 2.11.0 milestone Apr 12, 2022
@rdhabalia rdhabalia self-assigned this Apr 12, 2022
@github-actions

Copy link
Copy Markdown

@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@Anonymitaet

Copy link
Copy Markdown
Member

@rdhabalia is this a bug fix and we do not need to update docs?

@rdhabalia

Copy link
Copy Markdown
Contributor Author

this PR doesn't need doc update.

@Anonymitaet Anonymitaet added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Apr 19, 2022
@github-actions

Copy link
Copy Markdown

The pr had no activity for 30 days, mark with Stale label.

@github-actions

Copy link
Copy Markdown

The pr had no activity for 30 days, mark with Stale label.

@codelipenghui codelipenghui modified the milestones: 2.11.0, 2.12.0 Jul 26, 2022
@dlg99

dlg99 commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

@rdhabalia LGTM but the PR needs rebasing

@github-actions github-actions Bot removed the Stale label Aug 31, 2022
});
admin.namespaces().deleteNamespace(namespace);
try {
admin.namespaces().getPolicies(namespace);

Copy link
Copy Markdown
Contributor

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

@poorbarcode poorbarcode removed this from the 3.0.0 milestone Apr 10, 2023
@github-actions github-actions Bot removed the doc-not-needed Your PR changes do not impact docs label Oct 14, 2024
@github-actions

Copy link
Copy Markdown

@rdhabalia Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants