-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
schema evolution support #103
Comments
Hey @sudeepdino008 thanks for the question. From the top of my head it should work, but I might need to check it. I think if you introduce new schema and mark it as BACKWARD or BACKWARD_TRANSITIVE it should work because you will have to update consumers first and they will read the latest schema from the registry I guess. Could you try to emulate it in that order to prove that update of the consumer didn't help:
I think that's the way it should work and of course you will have to configure schema registry compatibility for the schema before registering new (or if it will be correct by default you are good). And if it will not work – let's dig deeper |
Hi @Strech, I've created this test - https://github.com/sudeepdino008/avrora/blob/master/test/avrora/schema/evolution_test.exs
|
It it helps, my use case is that I'm updating the schema on the reader side (with backwards compatibility ensured -- so only changes like deleting field, or adding new fields with default value), and expect the reader to be able to read data which is avro encoded by an older schema. |
Ok, so I came to know about schema registries. Can you tell if I'm understanding this correctly?
|
Yes, the writer will register (or you will register separately) new schema in the schema registry and it will be given an ID. Such ID is stored later in the binary message writer will generate/obtain. When reader will try to decode such message it will check for the ID if schema registry is enabled. But you can emulate evolution by scenario I presented to you when local cache is busted in order to obtain the latest version of the schema from local file. |
You are welcome |
Thank you for the time :) |
Hi, this is a question around schema evolution support in avrora. I want to basically:
I tried the first one in erlavro, and it didn't seem to work there. Perhaps the schema evolution support isn't there in avrora as well given that erlavro doesn't have it? Is there a way to get around it?
I've added the issue in erlavro too:
klarna/erlavro#117
The text was updated successfully, but these errors were encountered: