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

Endianness not taken into account consistently for serializer type IDs #12077

Closed
vbekiaris opened this issue Jan 4, 2018 · 2 comments
Closed

Endianness not taken into account consistently for serializer type IDs #12077

vbekiaris opened this issue Jan 4, 2018 · 2 comments

Comments

@vbekiaris
Copy link
Contributor

@vbekiaris vbekiaris commented Jan 4, 2018

InternalSerializationService.toBytes methods explicitly use BIG_ENDIAN to write the integer bytes for the given object's serializer type ID, regardless of the configured endianness. However inner objects' serializer type ID (ie those written out via ObjectDataOutput.writeObject) are serialized properly using the configured endianness.

Due to this, optimizations introduced in #10318 result in inconsistent serialization of NormalResponses when using LITTLE_ENDIAN byte order:

  • In 3.8, a NormalResponse object is serialized via toBytes -> the IdentifiedDataSerializable serializer type ID will be serialized in BIG_ENDIAN and inner response objects' serializer type ID will be written out in LITTLE_ENDIAN
  • In 3.9, the NormalResponse object header is written out properly but the the inner response object is now the top-level object passed to InternalSerializationService.toBytes -> its serializer type ID will be written out in BIG_ENDIAN
@mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Jan 12, 2018

Can this be closed if the PR was merged? Do we need to backport hazelcast/hazelcast-enterprise#1856?

@vbekiaris
Copy link
Contributor Author

@vbekiaris vbekiaris commented Jan 15, 2018

Closing this issue, will track further actions in hazelcast/hazelcast-enterprise#1848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.