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! |
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 |
|
@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)