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

[improve][admin] Not allow to terminate system topic. #17006

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

Technoboy-
Copy link
Contributor

Fixes #15891

Master Issue: #15891

Motivation

Pulsar-manager could see all the topics including the system topic and can terminate them. If terminates system topic by mistake, there would cause many serious problems. So it's better not allow to terminate the system topic.

Documentation

  • doc-not-needed
    (Please explain why)

@Technoboy- Technoboy- added this to the 2.11.0 milestone Aug 9, 2022
@Technoboy- Technoboy- added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/admin labels Aug 9, 2022
@Technoboy- Technoboy- self-assigned this Aug 9, 2022
@github-actions
Copy link

github-actions bot commented Aug 9, 2022

@Technoboy- Please provide a correct documentation label for your PR.
Instructions see Pulsar Documentation Label Guide.

@Technoboy- Technoboy- added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Aug 9, 2022
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.

What about terminating the partitioned topic?

@Technoboy-
Copy link
Contributor Author

What about terminating the partitioned topic?

Not allowed. The logic is here

.thenAccept(partitionMetadata -> {
if (partitionMetadata.partitions > 0) {
throw new RestException(Status.METHOD_NOT_ALLOWED,
"Termination of a partitioned topic is not allowed");
}
})

@Technoboy- Technoboy- force-pushed the fix-terminate-topic-api branch from ce6493c to f945afb Compare August 10, 2022 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin cherry-picked/branch-2.11 doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Topic policies cache have not init" randomly happen on different topics in the same namespace
4 participants