Description
When we first time marshal object, a binary type registration request is sent to the server. This request contains schemas for deserialization (deserialization without schema is not possible when CompactFooter is enabled). If the object contains references to objects of other types these types also sent to the server, but without schemas.
Reproducer:
try (Ignite ignite = Ignition.start(Config.getServerConfiguration())) { try (IgniteClient client = Ignition.startClient(new ClientConfiguration().setAddresses(Config.SERVER) .setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(true))) ) { IgniteCache<Integer, Person[]> igniteCache = ignite.getOrCreateCache(Config.DEFAULT_CACHE_NAME); ClientCache<Integer, Person[]> clientCache = client.getOrCreateCache(Config.DEFAULT_CACHE_NAME); Person[] val = new Person[] {new Person(1, "Joe")}; clientCache.put(1, val); assertArrayEquals(val, igniteCache.get(1)); } }
Fails with exception:
Caused by: class org.apache.ignite.binary.BinaryObjectException: Cannot find schema for object with compact footer [typeName=org.apache.ignite.client.Person, typeId=1468224522, missingSchemaId=970781171, existingSchemaIds=[]] at org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2028) at org.apache.ignite.internal.binary.BinaryReaderExImpl.<init>(BinaryReaderExImpl.java:287) at org.apache.ignite.internal.binary.BinaryReaderExImpl.<init>(BinaryReaderExImpl.java:186) at org.apache.ignite.internal.binary.BinaryObjectImpl.reader(BinaryObjectImpl.java:830) at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:793)
Attachments
Attachments
Issue Links
- causes
-
IGNITE-13135 CacheRegisterMetadataLocallyTest.testClientFindsValueByAffinityKeyStaticCacheWithoutExtraRequest failed
- Resolved
- links to