Comments (9)
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.
@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.
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.
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.
@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.
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.
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.
Yeah,
Thank you and sorry for the trouble
from schema_registry_converter.
@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)
- Can this crate be made to support hyphenated subject names? HOT 25
- New maintainance release with at least Tokio 1.0
- Have a way to leave out the full_name for the Proto Encoder HOT 1
- Implement std::error::Error for SRCError HOT 1
- Move Ci to Github Actions
- Have an easy way to use the async variants
- Improve readme
- multiple values encoding/decoding HOT 8
- Move caches to dashmap::DashMap
- Listing subjects and versions HOT 4
- Switch to apache-avro HOT 11
- Support for schema reference validation HOT 5
- Provide access to the schema in a DecodeResult ? HOT 4
- Remove or replace failure dependency HOT 1
- Support additional local protobuf definitions HOT 8
- Support Fetching Protobuf Field Names HOT 5
- Not all types are supported. HOT 1
- MessageResolver and IndexResolver Public HOT 1
- New Crates.io release? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schema_registry_converter.