Code Monkey home page Code Monkey logo

Comments (9)

gklijs avatar gklijs commented on June 28, 2024

Sounds a bit similar like how for Java you can use the specific.avro.reader option. With which it will use reflection with the full name, to get the schema from the classpath.
But Rust doesn't have reflection. What if there was a SchemaProvidedDecoder where you could put in schema's before using it to decode, and it will try to use the schema with the same name each time? In this case giving an error when there is no schema with the correct name, or the schema is incompatible?

from schema_registry_converter.

gklijs avatar gklijs commented on June 28, 2024

@PauloAOliveira could you please let me know what you think of the proposed solution? In December I probably do some work for a next release and I could add this.

from schema_registry_converter.

gklijs avatar gklijs commented on June 28, 2024

Seems like apache/avro#1379 might be able to solve this, and the only change needed is updating the Avro dependency once it has been fixed and released? What do you think?

from schema_registry_converter.

ultrabug avatar ultrabug commented on June 28, 2024

I'm trying to debug this as we speak since the PR you linked above does break the reader tests...

Unfortunately, all this is still obscure to me so I'm wasting a lot of time trying to understand why this happens.

What I'm quite not sure to understand @PauloAOliveira is that this crate is using the schema id of every message to deserialize it, so you should never be in the position I describe in the apache/avro PR : reading data encoded with an older schema version

from schema_registry_converter.

gklijs avatar gklijs commented on June 28, 2024

@ultrabug seems like you get into problems when serializing to a struct, when the data contains new fields. This might indeed be a bit different from the problem you are trying to solve. I think you should try to make sure if the tests are indeed valid, or failing because of wrong assumptions, but this is not always easy. I have some time in December to look at some of those edge cases.

from schema_registry_converter.

PauloAOliveira avatar PauloAOliveira commented on June 28, 2024

Sorry for the delay,
We got stuck on this problem when updating our schemas given that we were suffering with deserialization problems after adding new fields, using an "old" version of schema worked, however after our first interaction we found this very PR apache/avro#1379, we just finished testing with it and seems working pretty well, we forked schema_registry_converter to update the avro version until this issue is not fixed

from schema_registry_converter.

gklijs avatar gklijs commented on June 28, 2024

Nice, I guess it's fine to close this issue?
I'll hope a new release with the PR is available somewhere in December, as I can put out a maintenance release by than.

from schema_registry_converter.

PauloAOliveira avatar PauloAOliveira commented on June 28, 2024

Yeah,
Thank you and sorry for the trouble

from schema_registry_converter.

ultrabug avatar ultrabug commented on June 28, 2024

@PauloAOliveira may I kindly ask for your report on your problem + confirmation that my PR fixes your issue to on apache/avro#1379?

Thanks

from schema_registry_converter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.