-
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
NPE when get isAllowAutoUploadSchema #13831
NPE when get isAllowAutoUploadSchema #13831
Conversation
@gaozhangmin:Thanks for your contribution. For this PR, do we need to update docs? |
@gaozhangmin:Thanks for providing doc info! |
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java
Outdated
Show resolved
Hide resolved
pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
Outdated
Show resolved
Hide resolved
32d28ee
to
92552fb
Compare
I think that we may make a break change of client API. Am I correct? |
I think print null value by pulsar-admin client has no problem We don't need to make this change. |
4eb3557
to
936c21a
Compare
People can use pulsar admin not only in terminal, can use it in code. |
936c21a
to
54c8801
Compare
/pulsarbot run-failure-checks |
@codelipenghui PTAL |
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Show resolved
Hide resolved
@gaozhangmin Looks like #12786 not released yet) introduced the problem, but from the stack you have provided, looks like it happens in 2.9.1. |
### Motivation there were some potential NPE bug when get null value by pulsar-admin ``` Caused by: java.lang.NullPointerException at org.apache.pulsar.broker.admin.impl.NamespacesBase.internalGetIsAllowAutoUpdateSchema(NamespacesBase.java:2423) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1] at org.apache.pulsar.broker.admin.v2.Namespaces.getIsAllowAutoUpdateSchema(Namespaces.java:1631) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] ``` ### Modifications 1、set default value true to is_allow_auto_update_schema in Policies as same as ServiceConfiguration 2、changes from boolean to Boolean, long to Long, prevent potential NPE. (cherry picked from commit 0a8794b)
### Motivation there were some potential NPE bug when get null value by pulsar-admin ``` Caused by: java.lang.NullPointerException at org.apache.pulsar.broker.admin.impl.NamespacesBase.internalGetIsAllowAutoUpdateSchema(NamespacesBase.java:2423) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1] at org.apache.pulsar.broker.admin.v2.Namespaces.getIsAllowAutoUpdateSchema(Namespaces.java:1631) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] ``` ### Modifications 1、set default value true to is_allow_auto_update_schema in Policies as same as ServiceConfiguration 2、changes from boolean to Boolean, long to Long, prevent potential NPE. (cherry picked from commit 0a8794b)
Motivation
there were some potential NPE bug when get null value by pulsar-admin
Modifications
1、set default value true to is_allow_auto_update_schema in Policies as same as ServiceConfiguration
2、changes from boolean to Boolean, long to Long, prevent potential NPE.
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)