hazelcast-python-client
hazelcast-python-client copied to clipboard
[TRACKING ISSUE] Check nested fields of the Compact serializable objects are not serializable by other mechanisms in zero-config serialization
The tracking issue for the Java side PR.
See https://github.com/hazelcast/hazelcast/pull/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 https://github.com/hazelcast/hazelcast/issues/22004