-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]: Fix cannot delete namespace with system topic #14730
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
[fix][broker]: Fix cannot delete namespace with system topic #14730
Conversation
|
Hi @michaeljmarshall @shibd @dave2wave @RobertIndie Could you help review this ? |
shibd
left a comment
There was a problem hiding this 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.
|
@Jason918 @yuruguo @wolfstudy Could you please help review ? |
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
Outdated
Show resolved
Hide resolved
yuruguo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
Outdated
Show resolved
Hide resolved
(cherry picked from commit 7556c4e)
(cherry picked from commit 7556c4e)
(cherry picked from commit 7556c4e)
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,
and then get
Namespace not foundexception: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