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
Conversation
999cf6e
to
0f95f40
Compare
a71b6f0
to
3d13b96
Compare
There was a problem hiding this 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
3d13b96
to
9df71d4
Compare
9df71d4
to
20b7dcd
Compare
20b7dcd
to
8ca51af
Compare
There was a problem hiding this 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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.