hazelcast/hazelcast-python-client

[TRACKING ISSUE] Check nested fields of the Compact serializable objects are not serializable by other mechanisms in zero-config serialization

hz-devops-test opened this issue · 1 comments

The tracking issue for the Java side PR.

See hazelcast/hazelcast#22006 for details.


It could be the case that the top level class is serializable by
Compact, but it might have nested fields, which can also be serialized
by other mechanisms like Java serialization.

The problem is, that we cache the serializers, even the reflective
serializers. And, if we cache that we can serialize Java serializable
objects with Compact, this can be problematic for such scenarios

map.put(javaSerializable, 1)
map.put(zeroConfigSerializableWithJavaSerializableField, 2)
map.get(javaSerializable) // this returns null now, as the
// key was serialized with identified, but now it is Compact

To solve this, we check if the nested field is only be
serializable with Compact (either there is no other serialization
mechanism or Compact serializer is explicitly serialized with
it with addClass or addSerializer).

Closes hazelcast/hazelcast#22004

not applicable, we don't have zero-config serialization