codelipenghui opened a new pull request #10386:
URL: https://github.com/apache/pulsar/pull/10386
### Motivation
Currently, if using the ALWAYS_COMPATIBLE strategy and primary schemas, only
the first primary schema can upload to the schema registry, the root cause if
we are checking the hash of the schema data, if the hash equals to the existing
hash, the new schema will be skipped and return the existing schema.
This will not express the real schema since the primary schema has empty
schema data but different schema types. As #9612 fixes some problems due to the
hash comparison, so we are not using the hash comparison for the Avro-based
schema compatibility check. So this PR removed the hash comparison when put a
schema to the schema storage.
Currently, we are handling the schema type check, get schema by the schema
data and avoid put duplicate schemas at the SchemaRegistryServiceImpl.java. So
we can remove the hash check safety for now.
### Verifying this change
Improve the current unit test to make sure all primary schemas are uploaded
to the schema registry except the byte[] schema
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
### Documentation
- Does this pull request introduce a new feature? (no)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]