Skip to content

Conversation

@eolivelli
Copy link
Contributor

@eolivelli eolivelli commented Sep 12, 2022

Fixes #17588

Motivation

In Pulsar 2.10.1 with #14730 we introduced a check about concurrent deletion of Namespaces.
This broke the deletion of namespaces in case of a partial failure.

When you delete a namespace we collect all the resources, then we mark the namespace as "deleted", then we do the deletion.
if some failure happens and the procedure does not complete, then the namespaces stays in "deleted" status.
And if you try to delete it again you see the error in #17588 "The namespace is deleted", because getListOfNonPersistentTopics() performs a check about the status of the namespace.

Modifications

Do not check the flag "Policies.deleted" while listing non-persistent topics.è

Verifying this change

I added a test case that fails without this fix

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    It is a bug fix for a regression

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

@eolivelli
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@eolivelli eolivelli force-pushed the fix/error-delete-partially-deleted-namespace branch from e0097b1 to 2895cf2 Compare September 13, 2022 14:32
@eolivelli eolivelli merged commit 869339d into apache:master Sep 14, 2022
@eolivelli eolivelli deleted the fix/error-delete-partially-deleted-namespace branch September 14, 2022 06:42
Jason918 pushed a commit that referenced this pull request Sep 16, 2022
congbobo184 pushed a commit that referenced this pull request Nov 10, 2022
@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Nov 10, 2022
congbobo184 pushed a commit that referenced this pull request Dec 1, 2022
congbobo184 pushed a commit to congbobo184/pulsar that referenced this pull request Dec 1, 2022
…nd flaky test testFailoverSingleAckedPartitionedTopic
congbobo184 added a commit that referenced this pull request Dec 4, 2022
…ky test testFailoverSingleAckedPartitionedTopic (#18702)

Co-authored-by: congbobo184 <congbobo184@github.com>
Co-authored-by: Jiwe Guo <technoboy@apache.org>
### Motivation
1. add missing code for cherry-pick #17592
2. fix flaky test testFailoverSingleAckedPartitionedTopic. redeliver in another thread will cause receive repeat messages.
3. run test for branch-2.9
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.

[Bug] Delete Tenant Forcefully is broken if issued to a broker that is not owning all the topics/namespaces

7 participants