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

[TINKERPOP-3105] Running 3.6.x python-driver with 3.7.x server leads to deserialization errors #2742

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

xiazcy
Copy link
Contributor

@xiazcy xiazcy commented Aug 23, 2024

Currently, when skipping properties either via tokens or ReferenceElementStrategy with GraphBinaryV1, properties on element will return the default empty list, however drivers of older versions are expecting null properties for Reference Elements, as such serialization errors can occur in GLVs that does strict checking (i.e. python and go).

This PR updated the check to ReferenceVertex/Edge as value.properties() == null won't be reached, and will write null for properties of Reference Elements in the GraphBinary serializer.

Also updated docs to make it more clear.

@xiazcy xiazcy force-pushed the TINKERPOP-3105-compatibility branch from a5c78bb to 55f7b73 Compare August 23, 2024 22:38
@kenhuuu
Copy link
Contributor

kenhuuu commented Aug 23, 2024

Did you do the same check for VertexPropertySerializer or are metaproperties expected to be empty list instead of null.

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.74%. Comparing base (9b46b67) to head (84e31b9).
Report is 203 commits behind head on 3.7-dev.

Files with missing lines Patch % Lines
...mlin/structure/io/binary/types/EdgeSerializer.java 0.00% 0 Missing and 1 partial ⚠️
...ture/io/binary/types/VertexPropertySerializer.java 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             3.7-dev    #2742      +/-   ##
=============================================
+ Coverage      76.14%   76.74%   +0.59%     
- Complexity     13152    13204      +52     
=============================================
  Files           1084     1087       +3     
  Lines          65160    66436    +1276     
  Branches        7285     7309      +24     
=============================================
+ Hits           49616    50984    +1368     
+ Misses         12839    12743      -96     
- Partials        2705     2709       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiazcy xiazcy force-pushed the TINKERPOP-3105-compatibility branch from 55f7b73 to bfa074d Compare August 24, 2024 00:26
@xiazcy
Copy link
Contributor Author

xiazcy commented Aug 24, 2024

Did you do the same check for VertexPropertySerializer or are metaproperties expected to be empty list instead of null.

Yes, that's now also updated to write null instead of empty list as expected by older drivers.

@spmallette
Copy link
Contributor

Does GraphSON have these problems with 3.6.x drivers connecting to 3.7x servers?

@vkagamlyk
Copy link
Contributor

VOTE+1

@xiazcy
Copy link
Contributor Author

xiazcy commented Aug 26, 2024

Does GraphSON have these problems with 3.6.x drivers connecting to 3.7x servers?

No, GraphSON works fine, I've only seen errors in GraphBinary when I tested them. I'll update the docs to specify that.

…instead of empty list in GraphBinary serializer for compatibility
@xiazcy xiazcy force-pushed the TINKERPOP-3105-compatibility branch from bfa074d to 4033144 Compare August 26, 2024 16:30
@Cole-Greer
Copy link
Contributor

VOTE +1

@xiazcy xiazcy merged commit 2a6ca98 into apache:3.7-dev Sep 23, 2024
24 checks passed
@xiazcy xiazcy deleted the TINKERPOP-3105-compatibility branch September 23, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants