Skip to content

Conversation

@Technoboy-
Copy link
Contributor

@Technoboy- Technoboy- commented Mar 17, 2022

Fixes #10263

Master Issue: #10263

Motivation

When deleting namespace, the namespace policy is set to delete=true, but we don't check this state anymore. We should check this state at the get-policy stage.

After adding this check, topic lookup, get partitioned metadata will contain this logic, so we could resolve #10263.
Because when delete namespace, it will set this state first and delete all the topics. But if enabled topic auto-creation, all the pre-connected client will try to reconnect, and they will do lookup, but get the 'Namespace is deleted' exception,

Caused by: org.apache.pulsar.client.api.PulsarClientException$BrokerMetadataException: {"errorMsg":"Namespace is deleted","reqId":1586369459633846444, "remote":"localhost/127.0.0.1:54384", "local":"/127.0.0.1:54394"}

and then get Namespace not found exception:

org.apache.pulsar.client.api.PulsarClientException$BrokerMetadataException: {"errorMsg":"Namespace not found","reqId":4214931954315169737, "remote":"localhost/127.0.0.1:54472", "local":"/127.0.0.1:54482"}

These two exceptions will block clients connecting to the broker. so #10263 will be resolved.

Related email discuss here: https://lists.apache.org/thread/p4tmgk23l8j554bjr4h4ofk97bll5gp4

Documentation

  • no-need-doc

@Technoboy- Technoboy- self-assigned this Mar 17, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 17, 2022
@codelipenghui codelipenghui added this to the 2.11.0 milestone Mar 18, 2022
@codelipenghui codelipenghui added type/bug The PR fixed a bug or issue reported a bug release/2.9.3 release/2.8.4 release/2.10.1 labels Mar 18, 2022
@codelipenghui codelipenghui changed the title Add namespace state check. [fix][broker]: Fix cannot delete namespace with system topic Mar 18, 2022
@Technoboy-
Copy link
Contributor Author

Hi @michaeljmarshall @shibd @dave2wave @RobertIndie Could you help review this ?

Copy link
Member

@shibd shibd left a comment

Choose a reason for hiding this comment

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

Good idea! I tested with standalone, and the problem no reproduce.

@Technoboy-
Copy link
Contributor Author

@Jason918 @yuruguo @wolfstudy Could you please help review ?

Copy link
Contributor

@yuruguo yuruguo left a comment

Choose a reason for hiding this comment

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

LGTM

@codelipenghui codelipenghui requested a review from Jason918 March 22, 2022 05:30
@Technoboy- Technoboy- merged commit 7556c4e into apache:master Mar 22, 2022
codelipenghui pushed a commit that referenced this pull request Mar 25, 2022
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Mar 25, 2022
codelipenghui pushed a commit that referenced this pull request Apr 4, 2022
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Apr 4, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.8.4 release/2.9.3 release/2.10.1 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot delete non empty bundle

9 participants