You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mohan Parthasarathy (Jira)" <ji...@apache.org> on 2022/10/04 21:46:00 UTC

[jira] [Commented] (SPARK-40659) Schema evolution for protobuf (and Avro too?)

    [ https://issues.apache.org/jira/browse/SPARK-40659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17612811#comment-17612811 ] 

Mohan Parthasarathy commented on SPARK-40659:
---------------------------------------------

[~rangadi]  A few clarifications. I am trying to understand the conditions under which the error is thrown. Using Confluent schema registry terminology, let's take a couple of examples:

1) BACKWARDS:  Assuming the schema has evolved as per the rules, the consumer using the latest schema can read messages both from old and latest schema

2) FORWARDS: Similarly, the consumer using the older schema can read messages from a later schema; it would just ignore the new fields.

In these cases, it will continue to work. Why would we throw error in these cases ? What other cases needs an error to be thrown ? Could you elaborate ?

> Schema evolution for protobuf (and Avro too?)
> ---------------------------------------------
>
>                 Key: SPARK-40659
>                 URL: https://issues.apache.org/jira/browse/SPARK-40659
>             Project: Spark
>          Issue Type: Improvement
>          Components: Structured Streaming
>    Affects Versions: 3.3.0
>            Reporter: Raghu Angadi
>            Priority: Major
>
> Protobuf & Avro should support schema evolution in streaming. We need to throw a specific error message when we detect newer version of the the schema in schema registry.
> A couple of options for detecting version change at runtime:
>  * How do we detect newer version from schema registry? It is contacted only during planning currently.
>  * We could detect version id in coming messages.
>  ** What if the id in the incoming message is newer than what our schema-registry reports after the restart?
>  *** This indicates delayed syncs between customers schema-registry servers (should be rare). We can keep erroring out until it is fixed.
>  *** Make sure we log the schema id used during planning.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org