-
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
[Bug] Upload BYTES schema but got NULL schema type #18825
Comments
Assign to me please |
Thanks @labuladong |
The root cause is pulsar/pulsar-client-api/src/main/java/org/apache/pulsar/common/schema/SchemaType.java Lines 146 to 155 in 90f6758
Then Lines 592 to 598 in 90f6758
|
I think there are two solutions:
I tried Java client
pulsar/pulsar-broker/src/main/proto/SchemaRegistryFormat.proto Lines 25 to 48 in 90f6758
And |
Fixes [#18825](#18825) ### Motivation Admin API can upload `BYTES` schema and store a `NONE` schema in the schema registry, which is inconsistent with the client side. After discussion, we decided to forbid users from uploading `BYTES` schema. Mail list: https://lists.apache.org/thread/672zmptfblwjmrf9z8336mk12r7csngf ### Modifications Add a check to reject `BYTES` schema upload.
Search before asking
Version
Latest master
Minimal reproduce step
root@stg-billing-broker-0:/pulsar# cat schema.txt
{
"type": "BYTES",
"schema": "",
"properties": {}
}
root@stg-billing-broker-0:/pulsar# ./bin/pulsar-admin schemas upload persistent://public/default/asher-test -f schema.txt
root@stg-billing-broker-0:/pulsar# ./bin/pulsar-admin schemas get persistent://public/default/asher-test
{
"version": 4,
"schemaInfo": {
"name": "asher-test",
"schema": "",
"type": "NONE",
"properties": {}
}
}
What did you expect to see?
To keep consistent with the client side.
I think we should prevent the BYTES schema uploading
It's need to have discussion under the mailing list since it will change the existing behavior
What did you see instead?
No
Anything else?
No
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: