-
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]After the broker is restarted, the cache dynamic configuration is invalid #17035
Conversation
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
303ef28
to
3e25ab3
Compare
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
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.
Could you please help add tests? We are able to restart the broker during the test.
Good catch 👍 |
@codelipenghui @HQebupt @Technoboy- Fixed, PTAL,thanks! |
ac54b58
to
a772fdc
Compare
/pulsarbot run-failure-checks |
3 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
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.
Lgtm
This looks like a regression.
We should pick this into 2.11
@codelipenghui @zymap @lhotari
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
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.
LGTM
@lordcheng10 Please solve CI failure. |
/pulsarbot run-failure-checks |
OK |
/pulsarbot run-failure-checks |
7 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
Fixed,PTAL,thanks! @Jason918 |
@codelipenghui Fixed, PTAL,thanks! |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Show resolved
Hide resolved
Hi @lordcheng10 |
…ration is invalid (#17035)
Motivation
We update some cache dynamic configurations, such as: managedLedgerCacheSizeMB=100, but after we restarted the broker, we found that the dynamically modified cache configuration on zookeeper was invalid, and the value configured in broker.conf took effect.
After restarting, the loading process of config is as follows:
Load the broker.conf file and initialize the ServiceConfiguration object;
Use the ServiceConfiguration object to build the ManagedLedgerStorage object. When building the managedLedgerClientFactory object, the cache configuration in managedLedgerFactoryConfig is initialized through the conf object:
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
Lines 742 to 748 in 4b757cf
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/ManagedLedgerClientFactory.java
Lines 59 to 60 in abff91f
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
Lines 746 to 748 in 4b757cf
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Lines 2217 to 2250 in 4b757cf
Therefore, after the broker is restarted, the cache-related configuration used is still the configuration in the broker.conf file.
Solution:
The configuration is loaded in the following order:
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)