Hello!
I have added comment to this ticket describing why does it happen and how
to fix it.
In Ignite, when you get key from your value binary object, it's actually a
wrapper pointing at some position in its parent (value) binary object. When
you try to put it to cache, indexing cannot process
Maxim,
I've an appropriate ticket:
https://issues.apache.org/jira/browse/IGNITE-12911
Thanks, Alex
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Thank you, Alex!
Yes, I figured that this line indeed causes this crash. And yes, I'm using
queries and I need this line.
For now, I'm using the workaround I've described (of rebuilding the key
BinaryObject). But it's quite expensive operation and I would like to avoid
it.
This looks like a bug to
Thank you, Alex!
Yes, I figured that this line indeed causes this crash. And yes, I'm using
queries and I need this line.
For now, I'm using the workaround I've described (of rebuilding the key
BinaryObject). But it's quite expensive operation and I would like to avoid
it.
This looks like a bug to
Hi,
I was able to reproduce your use-case.
This line causes the issues you describe:
cacheConfig.setIndexedTypes(EmployeeId.class, Employee.class);
Comment it out, and everything works.
If you need Indexes, define them as need be, but remove these lines:
employeeCache.put(key2,
Yes, of course I'm using "cache.withKeepBinary()". Below is my exact
reproducer:
final URL configUrl =
getClass().getClassLoader().getResource("example-ignite.xml");
final Ignite ignite = Ignition.start(configUrl);
final CacheConfiguration cacheConfig = new
CacheConfiguration<>("Employee");
Hi,
When running your code I created the cache as follows:
IgniteCache employeeCache =
ignite.getOrCreateCache("employeeCache").withKeepBinary();
With the ".WithKeepBinary()" flag set code works, otherwise there are
serialization errors.
If you still get errors w/this flag set,
Ignite crashes when I use composite BinaryObject as a key and also include it
into the value object.
Here is the BinaryObject scenario:
// create a new composite key
BinaryObjectBuilder key1Builder =
Ignition.ignite().binary().builder(EmployeeId.class.getName());