Skip to content

[improve][transaction] Optimize topic lookup when TC end tx. - #14991

Merged
codelipenghui merged 8 commits into
apache:masterfrom
Technoboy-:optimise-tx-lookup-topic
Apr 12, 2022
Merged

[improve][transaction] Optimize topic lookup when TC end tx.#14991
codelipenghui merged 8 commits into
apache:masterfrom
Technoboy-:optimise-tx-lookup-topic

Conversation

@Technoboy-

@Technoboy- Technoboy- commented Apr 1, 2022

Copy link
Copy Markdown
Contributor

Motivation

When TC ends tx, it has to look up the topic. The original way uses pulsar-client to do this. It will look up every topic.
If using bundle cache to find the topic owner broker, it can avoid lookup every topic and then decrease the lookup time.

Modifications

  • Using bundle cache to find the topic owner broker. If occurs an error, fall back to look up the topic.
  • Remove the topic cache, because using bundle cache, the original cache is useless.

Documentation

  • no-need-doc

@Technoboy- Technoboy- changed the title Optimize topic lookup when TC end tx. [improve][transaction] Optimize topic lookup when TC end tx. Apr 1, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Apr 1, 2022
@Technoboy-
Technoboy- force-pushed the optimise-tx-lookup-topic branch from ab1c916 to 66c44f9 Compare April 2, 2022 07:50
@codelipenghui codelipenghui added this to the 2.11.0 milestone Apr 6, 2022
@codelipenghui codelipenghui added release/2.9.3 release/2.10.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/transaction labels Apr 6, 2022
@Technoboy-
Technoboy- force-pushed the optimise-tx-lookup-topic branch from 9af5f37 to 0f24949 Compare April 6, 2022 10:23
@codelipenghui
codelipenghui merged commit 46baae6 into apache:master Apr 12, 2022
aparajita89 pushed a commit to aparajita89/pulsar that referenced this pull request Apr 18, 2022
…14991)

### Motivation

When TC ends tx, it has to look up the topic. The original way uses pulsar-client to do this. It will look up every topic.
If using bundle cache to find the topic owner broker, it can avoid lookup every topic and then decrease the lookup time.

### Modifications

- Using bundle cache to find the topic owner broker. If occurs an error, fall back to look up the topic.
- Remove the topic cache, because using bundle cache, the original cache is useless.
codelipenghui pushed a commit that referenced this pull request Apr 19, 2022
### Motivation

When TC ends tx, it has to look up the topic. The original way uses pulsar-client to do this. It will look up every topic.
If using bundle cache to find the topic owner broker, it can avoid lookup every topic and then decrease the lookup time.

### Modifications

- Using bundle cache to find the topic owner broker. If occurs an error, fall back to look up the topic.
- Remove the topic cache, because using bundle cache, the original cache is useless.

(cherry picked from commit 46baae6)
codelipenghui pushed a commit that referenced this pull request Apr 19, 2022
When TC ends tx, it has to look up the topic. The original way uses pulsar-client to do this. It will look up every topic.
If using bundle cache to find the topic owner broker, it can avoid lookup every topic and then decrease the lookup time.

- Using bundle cache to find the topic owner broker. If occurs an error, fall back to look up the topic.
- Remove the topic cache, because using bundle cache, the original cache is useless.

(cherry picked from commit 46baae6)
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Apr 19, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
…14991)

### Motivation

When TC ends tx, it has to look up the topic. The original way uses pulsar-client to do this. It will look up every topic.
If using bundle cache to find the topic owner broker, it can avoid lookup every topic and then decrease the lookup time.

### Modifications

- Using bundle cache to find the topic owner broker. If occurs an error, fall back to look up the topic.
- Remove the topic cache, because using bundle cache, the original cache is useless.
codelipenghui pushed a commit to codelipenghui/incubator-pulsar that referenced this pull request May 17, 2022
…14991)

When TC ends tx, it has to look up the topic. The original way uses pulsar-client to do this. It will look up every topic.
If using bundle cache to find the topic owner broker, it can avoid lookup every topic and then decrease the lookup time.

- Using bundle cache to find the topic owner broker. If occurs an error, fall back to look up the topic.
- Remove the topic cache, because using bundle cache, the original cache is useless.

(cherry picked from commit 46baae6)
@Technoboy-
Technoboy- deleted the optimise-tx-lookup-topic branch August 10, 2022 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/transaction cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.9.3 release/2.10.1 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.

5 participants