Skip to content

[improve][broker] Tidy up the system topic.#15252

Merged
codelipenghui merged 11 commits into
apache:masterfrom
Technoboy-:tidy-up-sys-topic
Apr 25, 2022
Merged

[improve][broker] Tidy up the system topic.#15252
codelipenghui merged 11 commits into
apache:masterfrom
Technoboy-:tidy-up-sys-topic

Conversation

@Technoboy-

@Technoboy- Technoboy- commented Apr 21, 2022

Copy link
Copy Markdown
Contributor

Motivation

For #13520, #14643, #14949, we fix some issues related to system topic but result in checking the system topic in different method. So it's better to tidy up the system topic.

So put these system topic names into a new class called SystemTopicNames.

Documentation

  • no-need-doc

@Technoboy- Technoboy- self-assigned this Apr 21, 2022
@gaozhangmin

Copy link
Copy Markdown
Contributor

@Technoboy- Why not add a method to check if a system topic is a transaction related topic?

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Apr 21, 2022
@Technoboy-

Copy link
Copy Markdown
Contributor Author

@Technoboy- Why not add a method to check if a system topic is a transaction related topic?

We have PulsarService#isTransactionSystemTopic, I'm going to move this to a new class.

@codelipenghui codelipenghui added this to the 2.11.0 milestone Apr 24, 2022
@codelipenghui codelipenghui added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker labels Apr 24, 2022

@congbobo184 congbobo184 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.

LGTM

new TenantInfoImpl(Sets.newHashSet("appid1"), Sets.newHashSet(CLUSTER_NAME)));
admin.namespaces().createNamespace(NamespaceName.SYSTEM_NAMESPACE.toString());
admin.topics().createPartitionedTopic(TopicName.TRANSACTION_COORDINATOR_ASSIGN.toString(), numPartitionsOfTC);
createTransactionCoordinatorAssign(numPartitionsOfTC);

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.

I have a question why don't use admin.topics().createPartitionedTopic(TopicName.TRANSACTION_COORDINATOR_ASSIGN.toString(), numPartitionsOfTC); to create topic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, because TRANSACTION_COORDINATOR_ASSIGN is not a topic in fact. If we use the old way to create it like createPartitionedTopic , we have to check the name on the broker side to let it pass(like not to create managed ledger or something).

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.

Thanks for your reply.

Comment thread pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerTestBase.java Outdated

@gaoran10 gaoran10 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.

LGTM

@codelipenghui codelipenghui merged commit aa4df1b into apache:master Apr 25, 2022
@Technoboy- Technoboy- deleted the tidy-up-sys-topic branch August 10, 2022 05:50
congbobo184 pushed a commit that referenced this pull request May 31, 2023
### Motivation

Currently, topics/bundles in `pulsar/system` will be filter while doing shedding, which is introduced by mistake by pr #15252.
But we need to unload topics/bundles in `pulsar/system` for load balancing. 

### Modifications

do not filter topics/bundles in `pulsar/system`.
Technoboy- pushed a commit that referenced this pull request Jun 5, 2023
### Motivation

Currently, topics/bundles in `pulsar/system` will be filter while doing shedding, which is introduced by mistake by pr #15252.
But we need to unload topics/bundles in `pulsar/system` for load balancing. 

### Modifications

do not filter topics/bundles in `pulsar/system`.
RobertIndie pushed a commit that referenced this pull request Jun 7, 2023
### Motivation

Currently, topics/bundles in `pulsar/system` will be filter while doing shedding, which is introduced by mistake by pr #15252.
But we need to unload topics/bundles in `pulsar/system` for load balancing.

### Modifications

do not filter topics/bundles in `pulsar/system`.

(cherry picked from commit 5c74d20)
Technoboy- pushed a commit that referenced this pull request Dec 4, 2023
### Motivation

Currently, topics/bundles in `pulsar/system` will be filter while doing shedding, which is introduced by mistake by pr #15252.
But we need to unload topics/bundles in `pulsar/system` for load balancing. 

### Modifications

do not filter topics/bundles in `pulsar/system`.
nodece pushed a commit to nodece/pulsar that referenced this pull request Feb 23, 2024
### Motivation

Currently, topics/bundles in `pulsar/system` will be filter while doing shedding, which is introduced by mistake by pr apache#15252.
But we need to unload topics/bundles in `pulsar/system` for load balancing. 

### Modifications

do not filter topics/bundles in `pulsar/system`.
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.

7 participants