fury icon indicating copy to clipboard operation
fury copied to clipboard

Fury 0.5.1 is not backward compatible with 0.5.0

Open wkuranowski opened this issue 1 year ago • 2 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

Fury 0.5.1 Java 22

Component(s)

Java

Minimal reproduce step

I am unable to deserialize objects from Fury 0.5.0.

example bytes which works fine with 0.5.0: byte[] bytes0_5_0 = new byte[] {2, -1, -80, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -3};

In Fury 0.5.1 I get an exception:

java.lang.NullPointerException: Cannot read field "serializer" because "classInfo" is null
        at org.apache.fury.resolver.ClassResolver.getOrUpdateClassInfo(ClassResolver.java:1129) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.resolver.ClassResolver.readClassInfo(ClassResolver.java:1563) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.Fury.readRef(Fury.java:825) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.serializer.collection.GuavaCollectionSerializers$ImmutableSortedSetSerializer.newCollection(GuavaCollectionSerializers.java:196) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.serializer.collection.CollectionSerializer.read(CollectionSerializer.java:50) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.serializer.collection.CollectionSerializer.read(CollectionSerializer.java:27) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.Fury.readDataInternal(Fury.java:923) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.Fury.readRef(Fury.java:825) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.Fury.deserialize(Fury.java:760) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.Fury.deserialize(Fury.java:682) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.pool.ThreadPoolFury.lambda$deserialize$9(ThreadPoolFury.java:124) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.pool.ThreadPoolFury.execute(ThreadPoolFury.java:73) ~[fury-core-0.5.1.jar!/:0.5.1]
        at org.apache.fury.pool.ThreadPoolFury.deserialize(ThreadPoolFury.java:124) ~[fury-core-0.5.1.jar!/:0.5.1]

What did you expect to see?

Backward compatibility with 0.5.x

What did you see instead?

Fury 0.5.1 produces similar bytes, but with one difference: byte[] bytes0_5_1 = new byte[] {2, -1, **-68**, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -3};

Anything Else?

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

wkuranowski avatar May 28 '24 15:05 wkuranowski

Hi @wkuranowski , thanks for reporting this issue. Currently fury do not provide binary compatibility. We will provide such compatibility but it may wait for some versions

chaokunyang avatar May 29 '24 05:05 chaokunyang

@chaokunyang https://github.com/apache/incubator-fury?tab=readme-ov-file#binary-compatibility

binary compatibility is not guaranteed between Fury major releases for now. However, it is guaranteed between minor versions.

wkuranowski avatar May 29 '24 05:05 wkuranowski