Hello, Igniters. While working on IGNITE-7727 I found strange behavior of IgniteDataStreamer:
If we have IgniteUuid as an indexed type update silently brokes on a server
node.
Client doesn't have any notification about fails.
All calls of `addData`, `close`, etc. succeed on a client side but fails on
server side.
I see 2 issue here:
1. The fail itself - it certainly a bug, I think I can fix it.
2. Lack of client notification. Is it OK when client doesn't know about fails
of streamer updates?
Do we have this documented? I briefly looked at streamer docs but can't find
description of such behavior.
Reproducer [1]
```
public void testStreamer() throws Exception {
Ignite client = grid("client");
CacheConfiguration ccfg = new CacheConfiguration("UUID_CACHE");
ccfg.setIndexedTypes(IgniteUuid.class, String.class);
client.createCache(ccfg);
try(IgniteDataStreamer<IgniteUuid, String> cache =
client.dataStreamer("UUID_CACHE")) {
for(Integer i=0; i<2; i++)
cache.addData(IgniteUuid.randomUuid().toString(), i.toString());
}
}
```
Server node stack trace [2]:
```
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to update
index, incorrect key class [expCls=org.apache.ignite.lang.IgniteUuid,
actualCls=org.apache.ignite.internal.binary.BinaryObjectImpl]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.typeByValue(GridQueryProcessor.java:1954)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.store(GridQueryProcessor.java:1877)
at
org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.store(GridCacheQueryManager.java:403)
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.finishUpdate(IgniteCacheOffheapManagerImpl.java:1343)
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.invoke(IgniteCacheOffheapManagerImpl.java:1207)
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.invoke(IgniteCacheOffheapManagerImpl.java:345)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.storeValue(GridCacheMapEntry.java:3527)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.initialValue(GridCacheMapEntry.java:2735)
at
org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl$IsolatedUpdater.receive(DataStreamerImpl.java:2113)
... 11 more
```
[1] https://gist.github.com/nizhikov/2e70a73c7b74a50fc89d270e9af1e1ca
[2] https://gist.github.com/nizhikov/c491c8f2b45aa59458b37b42b4b8dab4
signature.asc
Description: This is a digitally signed message part
