-
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
[improve][broker] Skip loading the NAR packages if not configured #21867
[improve][broker] Skip loading the NAR packages if not configured #21867
Conversation
### Motivation When loading NAR packages, including broker interceptors, additional servlets and protocol handlers, even if they are not configured, the NAR packages are still loaded, which is unnecessary and slows the restarting of a broker. ### Modifications Skip searching the directories and loading NAR packages when no plugin is configured, including: - `BrokerInterceptors#load` - `AdditionalServlets#load` - `ProtocolHandlers#load`
@BewareMyPower Nice improvement. How about applying this also to src/main/java/org/apache/pulsar/proxy/extensions/ProxyExtensions.java. ? pulsar/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/extensions/ProxyExtensions.java Lines 51 to 85 in 82237d3
|
@lhotari Good suggestion. I applied the check to |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #21867 +/- ##
============================================
+ Coverage 73.59% 73.61% +0.01%
- Complexity 32323 32347 +24
============================================
Files 1858 1859 +1
Lines 138174 138281 +107
Branches 15148 15156 +8
============================================
+ Hits 101696 101801 +105
+ Misses 28608 28598 -10
- Partials 7870 7882 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ache#21867) (cherry picked from commit ea7e978)
…ache#21867) (cherry picked from commit ea7e978)
Motivation
When loading NAR packages, including broker interceptors, additional servlets and protocol handlers, even if they are not configured, the NAR packages are still loaded, which is unnecessary and slows the restarting of a broker.
Modifications
Skip searching the directories and loading NAR packages when no plugin is configured, including:
BrokerInterceptors#load
AdditionalServlets#load
ProtocolHandlers#load
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: