You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a NearCache is used for an IMap then merge(key, value, remappingFunction) operation fails reporting a wrong key type.
Exception output:
Exception in thread "main" java.lang.IllegalArgumentException: key cannot be of type Data!
at com.hazelcast.internal.util.Preconditions.checkNotInstanceOf(Preconditions.java:300)
at com.hazelcast.internal.nearcache.impl.DefaultNearCache.checkKeyFormat(DefaultNearCache.java:221)
at com.hazelcast.internal.nearcache.impl.DefaultNearCache.get(DefaultNearCache.java:123)
at com.hazelcast.client.map.impl.nearcache.NearCachedClientMapProxy.getCachedValue(NearCachedClientMapProxy.java:597)
at com.hazelcast.client.map.impl.nearcache.NearCachedClientMapProxy.getInternal(NearCachedClientMapProxy.java:117)
at com.hazelcast.client.impl.proxy.ClientMapProxy.mergeLocally(ClientMapProxy.java:2174)
at com.hazelcast.client.impl.proxy.ClientMapProxy.merge(ClientMapProxy.java:2167)
at Test.main(Test.java:32)
This problem is very similar to the one described in #13371 and the workaround described in original stackoverflow question setting serialize-keys=true helps avoid exception.
Until the bug is fixed, how safe is this workaround to use? What can it affect?
The text was updated successfully, but these errors were encountered:
It is about performance, lookup keys are serialized when serialize-keys=true, this can degrade near-cache read performance, if key serialization is expensive. But best to measure to see.
Hazelcast version: 5.0
When a
NearCache
is used for anIMap
thenmerge(key, value, remappingFunction)
operation fails reporting a wrong key type.Exception output:
Reproducer:
This problem is very similar to the one described in #13371 and the workaround described in original stackoverflow question setting
serialize-keys=true
helps avoid exception.Until the bug is fixed, how safe is this workaround to use? What can it affect?
The text was updated successfully, but these errors were encountered: