-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[bugfix] Prevent Automatic Topic Creation during namespace deletion #17609
[bugfix] Prevent Automatic Topic Creation during namespace deletion #17609
Conversation
@poorbarcode @dlg99 PTAL |
@poorbarcode unfortunately my test case doesn't cover well the change, because basically the automatic topic creation is prevented earlier, because we have the check about policies.deleted in PulsarWebResources.checkLocalOrGetPeerReplicationCluster() do you have some suggestions ? |
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.
This reduces the probability of problems occurring. When the namespace deletion instruction is not processed by the current broker, may succeed in creating the topic because the meta data has a brief cache.
This is a good point, but I would defer it to the most bigger issue of cache consistency |
@poorbarcode I added another test that demonstrates that this patch is covering one edge case that you mentioned. The new test covers this change now |
d5bc53f
to
3a53155
Compare
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/test/java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java
Show resolved
Hide resolved
3a53155
to
b74b8ec
Compare
b74b8ec
to
cfc2f5a
Compare
…pache#17609) (cherry picked from commit af98304)
…eNamespaceWithAutomaticTopicCreation import
…eNamepacesWithAutomaticTopicCreation import
Motivation
During the deletion of a namespace we don't want that autoTopicCreation triggers the creation of topics.
This is related to #17308 but it deals only with Namespace and Tenant deletion.
Modifications
Consider "Policies.deleted" while deciding if autoTopicCreation is available or not
Verifying this change
I will add tests
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)