[FLINK-33045] Make it possible to disable auto-registering schema in Schema Registry - #26662
[FLINK-33045] Make it possible to disable auto-registering schema in Schema Registry#26662MartijnVisser wants to merge 4 commits into
Conversation
|
@flinkbot run azure |
1 similar comment
|
@flinkbot run azure |
94811df to
ba6bd2e
Compare
7304dde to
0b8f50b
Compare
fapaul
left a comment
There was a problem hiding this comment.
Thanks for working on this feature. It's a great quality of life improvement.
|
hi , will this PR correct this problem ? -> https://stackoverflow.com/questions/79738462/flink-confluentregistryavroserializationschema-not-respecting-registryconfigs ? thanks |
| // Commonly used options maintained by Flink for convenience | ||
| // -------------------------------------------------------------------------------------------- | ||
|
|
||
| public static final ConfigOption<Boolean> AUTO_REGISTER_SCHEMAS = |
There was a problem hiding this comment.
can't we rely on the schema-registry ser/deser that already support these options like (
AUTO_REGISTER_SCHEMAS , USE_SCHEMA_ID , NORMALIZE_SCHEMAS , AVRO_REMOVE_JAVA_PROPS_CONFIG ) than adding it here ?
There was a problem hiding this comment.
No. Flink doesn't use Confluent's KafkaAvroSerializer, ConfluentSchemaRegistryCoder talks to the SchemaRegistryClient directly and writes the magic byte and id itself. The registry configs only ever reached the client, so serializer options like auto.register.schemas were silently ignored. This PR implements that one under the same key Confluent uses, so it also works when passed via registryConfigs in the DataStream API. use.schema.id and normalize.schemas would need the same treatment, that's a follow-up.
…client to 7.9.8 and test images to cp-8.3.0
…n to allow disabling schema auto-registration
…ith AvroConfluentITCase
…ro-confluent formats
|
@raphaelauv Yes, that's the same problem. |
What is the purpose of the change
This PR is based on #25410 and aims to complete the necessary tasks. It introduces
auto.register.schemasas a table option. Compared to the linked PR, it includes unit tests, a new IT case and updated documentationBrief change log
auto.register.schemasAvroConfluentITCaseVerifying this change
This change added tests and can be verified as follows:
AvroConfluentITCasethat writes and reads from/to Kafka usingavro-confluent, with the table option set totrue(default) to show that Flink can register the schema andfalsewhere it relies on schema registration outside of FlinkDoes this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation