-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[fix][broker] Skip loading broker interceptor when disableBrokerInterceptors is true #20422
Conversation
/pulsarbot rerun-failure-checks |
Codecov Report
@@ Coverage Diff @@
## master #20422 +/- ##
============================================
- Coverage 72.90% 72.90% -0.01%
- Complexity 31864 31880 +16
============================================
Files 1864 1864
Lines 138416 138417 +1
Branches 15188 15189 +1
============================================
- Hits 100919 100917 -2
- Misses 29477 29489 +12
+ Partials 8020 8011 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
@nodece what is the real-world affect without this fix? Will the broker crash or thow exception?
This can be semantically correct while if we have a real world problem, we may add a test case to prevent regressions.
Without this patch, the broker always inits the broker interceptor and calls it.
The broker works fine.
Perhaps I should add a test to check this call. |
…ceptors is true Signed-off-by: Zixuan Liu <nodeces@gmail.com>
7051026
to
d4eaa21
Compare
…ceptors is true (#20422) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
…kerInterceptors is true (apache#20422)" This reverts commit 639c460.
Motivation
When
disableBrokerInterceptors
istrue
, we should skip loading the broker interceptor to avoid initializing it.This configuration is
true
by default, whether enabled or not, it will not affect the broker feature.By the way, the web service and broker service should keep the same behavior:
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
Lines 216 to 224 in b7f7e04
Modifications
disableBrokerInterceptors
value, and then load the broker interceptordisableBrokerInterceptors
descriptionDocumentation
doc
doc-required
doc-not-needed
doc-complete