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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rdhabalia
Copy link
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

@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
Member

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

@rdhabalia
Copy link
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

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

@github-actions
Copy link

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
Copy link
Contributor

dlg99 commented Aug 30, 2022

@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
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
@poorbarcode poorbarcode added this to the 3.1.0 milestone Apr 10, 2023
@Technoboy- Technoboy- modified the milestones: 3.1.0, 3.2.0 Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 14, 2024
@github-actions github-actions bot added doc-label-missing and removed doc-not-needed Your PR changes do not impact docs labels Oct 14, 2024
Copy link

@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