-
Notifications
You must be signed in to change notification settings - Fork 829
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
DefaultClassResolver : No back/forward compatibility with kryo.setRegistrationRequired(true) ? #491
Comments
I didn't have a close look at the code, but it should be possible to make this issue reproducable with a unit test by using two differently configured kryo instances, right? Do you have an idea how to achieve the expected solution? |
Sorry for the delay but I was on vacation. |
testBackwardRegistrationSerialization is not supported. If classes are written as IDs, you can't later read them without registering the classes. Kryo reads the int ID but has no idea what class that means. testForwardRegistrationSerialization should work. You have a bug in your test, you use TaggedFieldSerializer (set explicitly with
|
Setup
kryo-shaded-4.0.0
Former configuration :
Intended configuration :
Problem :
com.esotericsoftware.kryo.util.DefaultClassResolver relies on nameIdToClass member.
If kryo.setRegistrationRequired(false); it seems that this expected information (nameId) was not serialized. Thus, cannot be retrieved when set to kryo.setRegistrationRequired(true);
There seems to be more about this in DefaultClassResolver :
Expected solution :
Back/forward compatibility when trying to force registration of objects, even if that was not done with entries already serialized.
This is intended to address the following : #398
Am I missing something and does that sound reasonable/feasible ?
The text was updated successfully, but these errors were encountered: