-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] Set the ServiceUnitStateChannel topic compaction threshold explicitly and other bug fixes #22048
[fix][broker] Set the ServiceUnitStateChannel topic compaction threshold explicitly and other bug fixes #22048
Conversation
...ava/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
Outdated
Show resolved
Hide resolved
admin.topicPolicies() | ||
.setCompactionThreshold(ServiceUnitStateChannelImpl.TOPIC, threshold); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put this in a finally
block to limit the blast radius of this test if it fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should always pass. I wonder in what cases this setCompactionThreshold
might fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry for the confusion. It's not that setCompactionThreshold
might fail, but anything in between the previous call to this "reset" call might (i.e., lines https://github.com/apache/pulsar/pull/22048/files#diff-0bb4e0f521ef681668abbb30387c7de6ebf6cfce7dcbdd3d2f318ac50f6cc8abR967-R986). So put the entire respective block in a try
and this in a finally
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see. nice catch. updated.
@@ -298,6 +299,14 @@ public synchronized void start() throws PulsarServerException { | |||
|
|||
ExtensibleLoadManagerImpl.createSystemTopic(pulsar, TOPIC); | |||
|
|||
if (config.isSystemTopicAndTopicLevelPoliciesEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this flag returns false? Is that a valid way to configure Pulsar with this code? would it make sense to prevent such configuration in the first place, or at least log a warning?
a5421e7
to
56ae3e9
Compare
56ae3e9
to
0942c13
Compare
0942c13
to
ec93862
Compare
re-raised the pr here. #22064 |
Motivation
We better set the compaction threshold of the serviceUnitStateChannel topic when initializing itself instead of relying on other components' init.
Also, I found the lookup and unload request often timeout by
Modifications
Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: https://github.com/heesung-sn/pulsar/pull/61/files