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][broker] Tidy up the system topic. #15252

Merged
merged 11 commits into from
Apr 25, 2022

Conversation

Technoboy-
Copy link
Contributor

@Technoboy- Technoboy- commented Apr 21, 2022

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
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
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
Copy link
Contributor

@congbobo184 congbobo184 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -123,7 +125,7 @@ protected void setUpBase(int numBroker,int numPartitionsOfTC, String topic, int
admin.tenants().createTenant(NamespaceName.SYSTEM_NAMESPACE.getTenant(),
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
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
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
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.

Copy link
Contributor

@gaoran10 gaoran10 left a comment

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