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

Fix GetListInBundle return all Topics in bundle #11110

Merged
merged 2 commits into from
Jun 29, 2021

Conversation

315157973
Copy link
Contributor

@315157973 315157973 commented Jun 26, 2021

Motivation

@Path("/{tenant}/{namespace}/{bundle}")
@ApiOperation(value = "Get the list of non-persistent topics under a namespace bundle.",
response = String.class, responseContainer = "List")
@ApiResponses(value = {

getListFromBundle in NonPersistentTopics should only return the list of non-persistent topics under a namespace bundle.
But now it returns all the topics.

Now it will traverse all topics on Broker. When there are a lot of topics, timeouts often occur.
image

I will support getting all topics or only persistent topics in another PR

Modifications

  1. Filter out persistent topics
  2. Only traverse the topics under the corresponding bundle

Verifying this change

@315157973 315157973 self-assigned this Jun 26, 2021
@codelipenghui codelipenghui added this to the 2.9.0 milestone Jun 26, 2021
@Anonymitaet
Copy link
Member

@315157973 does this affect docs?

@315157973
Copy link
Contributor Author

@315157973 does this affect docs?

Does not affect the docs

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

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

LGTM

@Anonymitaet Anonymitaet added the doc-not-needed Your PR changes do not impact docs label Jun 29, 2021
@codelipenghui codelipenghui merged commit a6ab3af into apache:master Jun 29, 2021
codelipenghui pushed a commit that referenced this pull request Jul 7, 2021
https://github.com/apache/pulsar/blob/7824325efc822307f60b38e9d24bdb189e415a06/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java#L310-L313

1.
`getListFromBundle` in NonPersistentTopics should only return the list of non-persistent topics under a namespace bundle.
But now it returns all the topics.

2.
Now it will traverse all topics on Broker. When there are a lot of topics, timeouts often occur.
![image](https://user-images.githubusercontent.com/9758905/123505745-67815d80-d693-11eb-87bb-ef3287668155.png)

I will support getting all topics or only persistent topics in another PR

1) Filter out persistent topics
2) Only traverse the topics under the corresponding bundle

(cherry picked from commit a6ab3af)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 7, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### Motivation

https://github.com/apache/pulsar/blob/7824325efc822307f60b38e9d24bdb189e415a06/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java#L310-L313

1.
`getListFromBundle` in NonPersistentTopics should only return the list of non-persistent topics under a namespace bundle.
But now it returns all the topics.

2.
Now it will traverse all topics on Broker. When there are a lot of topics, timeouts often occur.
![image](https://user-images.githubusercontent.com/9758905/123505745-67815d80-d693-11eb-87bb-ef3287668155.png)


I will support getting all topics or only persistent topics in another PR

### Modifications
1) Filter out persistent topics
2) Only traverse the topics under the corresponding bundle
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 doc-not-needed Your PR changes do not impact docs release/2.8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants