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

GEODE-10076. Align String serialization with Java client #973

Merged
merged 2 commits into from Jul 8, 2022

Conversation

albertogpz
Copy link
Contributor

The Geode C++ native client library serializes strings of PdxSerializable objects with DSCode CacheableString.
Nevertheless, the Java client, in order to serialize Strings, it analyzes them and different DSCodes are assigned depending on the contents (only ASCII vs not only ASCII chars) and length. In the native client, it's always set to CacheableString, whenever for example in the case of an ASCII string should be CacheableASCIIString.

This can provoke that two objects with the same contents created one by the native client and the other by the Java classes return false when compared with the equals method.

The writeString() method of the DataOutput() class of the Geode C++ native client library has been aligned with its counterpart in the Java library so that the serialization is the same in both cases.

@albertogpz albertogpz force-pushed the feature/GEODE-10076 branch 3 times, most recently from 999cf6e to 0f95f40 Compare May 19, 2022 07:16
@albertogpz albertogpz marked this pull request as ready for review May 19, 2022 07:26
@albertogpz albertogpz force-pushed the feature/GEODE-10076 branch 2 times, most recently from a71b6f0 to 3d13b96 Compare May 23, 2022 16:33
Copy link
Contributor

@gaussianrecurrence gaussianrecurrence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks OK. However you need to re-execute Windows pipelines, as by the time you published the PR were failing

Copy link
Contributor

@gaussianrecurrence gaussianrecurrence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All pipelines are passing and the change looks fine

@albertogpz albertogpz merged commit 26fe727 into apache:develop Jul 8, 2022
@albertogpz albertogpz deleted the feature/GEODE-10076 branch July 8, 2022 09:00
gaussianrecurrence added a commit to Nordix/geode-native that referenced this pull request Aug 2, 2022
 - After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by using unicode hexcode codepoint
   characters, rather than the actual codepoint.
gaussianrecurrence added a commit to Nordix/geode-native that referenced this pull request Aug 4, 2022
 - After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
gaussianrecurrence added a commit to Nordix/geode-native that referenced this pull request Aug 11, 2022
 - After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
gaussianrecurrence added a commit to Nordix/geode-native that referenced this pull request Aug 11, 2022
 - After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
gaussianrecurrence added a commit to Nordix/geode-native that referenced this pull request Aug 16, 2022
 - After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
gaussianrecurrence added a commit to Nordix/geode-native that referenced this pull request Aug 16, 2022
 - After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
albertogpz pushed a commit that referenced this pull request Aug 17, 2022
- After merging #973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
albertogpz pushed a commit to Nordix/geode-native that referenced this pull request Nov 8, 2022
- After merging apache#973, javaobject compilation was broken for Java 11.
   The build passed since packer images uses Java 8, but as docker build
   images uses Java 11, compilation is failing there.
 - Root cause of the compilation issue is the difference in UTF-8 string
   handling between Java 8 and Java 11.
 - So, the issue was fixed by specifying UTF-8 encoding while compiling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants