-
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] Fix unexpected behaviour by invoke PulsarConfigurationLoader#convertFrom
#18816
Conversation
@mattisonchao Please add the following content to your PR description and select a checkbox:
|
PulsarConfigurationLoader#convertFrom
PulsarConfigurationLoader#convertFrom
PulsarConfigurationLoader#convertFrom
PulsarConfigurationLoader#convertFrom
PulsarConfigurationLoader#convertFrom
PulsarConfigurationLoader#convertFrom
Codecov Report
@@ Coverage Diff @@
## master #18816 +/- ##
============================================
- Coverage 50.05% 41.60% -8.46%
+ Complexity 11024 2404 -8620
============================================
Files 703 235 -468
Lines 68814 16671 -52143
Branches 7378 1819 -5559
============================================
- Hits 34446 6936 -27510
+ Misses 30621 8974 -21647
+ Partials 3747 761 -2986
Flags with carried forward coverage won't be shown. Click here to find out more. |
pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyConfigurationTest.java
Show resolved
Hide resolved
...r-common/src/main/java/org/apache/pulsar/common/configuration/PulsarConfigurationLoader.java
Show resolved
Hide resolved
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! could you please add a test for annotation FieldContext.class
…Loader#convertFrom` (#18816)
…Loader#convertFrom` (apache#18816)
…Loader#convertFrom` (apache#18816)
…Loader#convertFrom` (apache#18816)
Motivation
This regression is introduced by #16234.
I found it by setting
proxyAdditionalServlets
on the proxy, I expected it could load the additional servlet, but it didn’t work well. theproxyConfig.getProperties().getProperty("proxyAdditionalServlets")
method returnsnull
after invokingPulsarConfigurationLoader#convertFrom
.After investigating, The root cause is we use the same properties object when we invoke
convertFrom
method. And then, it set the unknown field to the new config without any type check.Modifications
Verifying this change
Make sure that the change passes the CI checks.
doc-not-needed