Skip to content

[improve][broker] Using TopicName instead of String as the parameter for getTopic. - #17416

Merged
Technoboy- merged 4 commits into
apache:masterfrom
Technoboy-:remove-using-common-pool-thread
Sep 5, 2022
Merged

Technoboy- merged 4 commits into
apache:masterfrom
Technoboy-:remove-using-common-pool-thread

Conversation

@Technoboy-

Copy link
Copy Markdown
Contributor

Motivation

When we call broker#getTopic to get topics, the same topic requests twice, once with the domain and once without the domain, then there will be 2 instances in topics. Both instances are associated with the same ManagedLedger.

Because we put the key persistent://tn/ns/xxx and tn/ns/xxx into the topics. In this case, when we close the topic, another key related to the topic and the ManagedLedger may cause creating producer/consumer failure. see the below test.

Documentation

  • doc-not-needed
    (Please explain why)

@Technoboy- Technoboy- self-assigned this Sep 2, 2022
@Technoboy- Technoboy- added this to the 2.12.0 milestone Sep 2, 2022
@Technoboy- Technoboy- added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker doc-not-needed Your PR changes do not impact docs labels Sep 2, 2022

@codelipenghui codelipenghui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting problem. Does the issue always exist or introduced from a version?

@Technoboy-

Copy link
Copy Markdown
Contributor Author

Interesting problem. Does the issue always exist or introduced from a version?

Seems always exists

@mattisonchao mattisonchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice catch

@Technoboy-
Technoboy- merged commit a49fbf6 into apache:master Sep 5, 2022
michaeljmarshall pushed a commit that referenced this pull request Feb 27, 2023
Remote test `testGetTopic`, because it was mis cherry-picked by #18181.
The original pr for this test is #17416

(cherry picked from commit fc96e47)
@nodece

nodece commented Mar 1, 2023

Copy link
Copy Markdown
Member

This PR has been cherry-pick to branch-2.11 by #19632

@nodece nodece mentioned this pull request Mar 1, 2023
1 of 4 tasks
@Technoboy-
Technoboy- deleted the remove-using-common-pool-thread branch September 14, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker 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.

4 participants