Aleksey Plekhanov created IGNITE-13096:
------------------------------------------
Summary: Java thin client: Binary type schema is not registered
for nested objects when CompactFooter is enabled
Key: IGNITE-13096
URL: https://issues.apache.org/jira/browse/IGNITE-13096
Project: Ignite
Issue Type: Bug
Reporter: Aleksey Plekhanov
Assignee: Aleksey Plekhanov
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:
{code:java}
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));
}
}
{code}
Fails with exception:
{noformat}
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){noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)