-
Notifications
You must be signed in to change notification settings - Fork 822
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
Urgent: Data Corruption Issue Identified During DTO Deserialization (Instance Variable Renamed/Type Changed) #1068
Comments
What's your Kryo configuration? The default If you want to be able to evolve your serialized objects you have to use |
TaggedFieldSerializer is the right choice in most situations, IMO. Maybe the readme could make this more clear. |
Thanks @NathanSweet @theigl , we are using default serializer(Field Serializer). Will check your recommendations and share updates. |
We checked the serializers, TaggedFieldSerializer seems to be compatible but has performance overhead as compared to FieldSerializer. Is it possible for Kryo team to take this behaviour as a defect so that exception is thrown in all cases if kryo finds differences in schema with field serializer . |
What FieldSerializer writes looks something like this:
When reading this back,
In your case, all of these |
Thank you for the prompt reply, @theigl. Could you please share or direct me to the performance metrics for the TaggedFieldSerializer? I'm interested in understanding the additional memory it might consume as compared to FieldSerializer |
Currently there is only this comparison in the readme, but it focuses on throughput and not memory. For more data, you can always run |
Thanks for the quick response @theigl . After evaulating our use-cases we have decided to move forrward with CompatiableFieldSerialzer as a default serializer, but we have below queries
|
Hi team, We are currently using Kryo3 and need assistance with setting the |
Hi team, any updates on this ? |
Describe the bug
We've identified data corruption during DTO deserialization when there are changes in existing fields/instance variables in a dto
To Reproduce
Have a simple dto, lets say employee with following details
Serialize this dto using below code
Change the dto
De-Serialize now using below code
Expected Behaviour
Since the dto has changes , kryo should either throw an exception or should give the correct data but we are seeing data corruption , example below
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: