Skip to content
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

fix compatible field serializer binary search bugs #539

Closed
wants to merge 1 commit into from

Conversation

lixt
Copy link

@lixt lixt commented Sep 8, 2017

Fix deserializing bugs using CompatibleFieldSerializer with object which can trigger binary search. Just set the max boundary of binary search to the length of target array. I also update the unit test for this situation.

@magro
Copy link
Collaborator

magro commented Sep 16, 2017

Thanks for the PR!

Can you describe in greater detail in which case/scenario an unexpected effect is triggered?
Perhaps a dedicated test for this situation makes sense?

@lixt
Copy link
Author

lixt commented Sep 23, 2017

This unexpected effect is triggered when binary search is used on object with more than 32 fields. And the case I have already added into the unit test. Just a little mistake in Kryo's binary search algorithm~

@lixt
Copy link
Author

lixt commented Sep 23, 2017

Just a glance of the code in CompatibleFieldSerializer.java and you'll know what i'm talking about. With this bug, Kryo losts its backward compatibilty when removing fields in objects with more than 32 fields.

@abourov
Copy link

abourov commented Nov 13, 2017

This is a fairly major bug, is there a reason why there is no bug report for it, nor has this pull request been added to any release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants