Roman Koriakov created IGNITE-12445: ---------------------------------------
Summary: When Cache Metrics are switched on (statisticsEnabled = true) the empty cache events arrive to the client nodes Key: IGNITE-12445 URL: https://issues.apache.org/jira/browse/IGNITE-12445 Project: Ignite Issue Type: Bug Components: general Affects Versions: 2.7.6 Environment: OS Name Microsoft Windows 10 Pro java version "1.8.0_231" java version OpenJDK 64-Bit Server VM 11+28 Reporter: Roman Koriakov If we want to react on some PUT or READ cache operations first of all we need to turn on the appropriate cache events on the server node and catch those events on the client nodes using remote approach with two listeners. It works well until we switch on *statisticsEnabled* on the server node, it will lead to the situation when we get empty *CacheEvent* objects. The example that demonstrates this issue is in the attachments. This example is consists of three nodes: 1 server node with cache and 2 clients. One client is filling the cache and the second one is listening PUT operations. When we turn on Cache Metrics on the server node: *cacheConfig.setStatisticsEnabled(true);* in *EventServerCache.java* we get empty events ({color:#172b4d}Sometimes {color}CacheEvent objects with null fields. Sometimes there are no events at all) My suppose is there is some Exception in GridCacheEventManager.addEvent() when Cache Metrics is turned on. {color:#cc7832}catch {color}(Exception e) { {color:#cc7832}if {color}(!{color:#9876aa}cctx{color}.cacheObjectContext().kernalContext().cacheObjects().isBinaryEnabled({color:#9876aa}cctx{color}.config())) {color:#cc7832}throw {color}e{color:#cc7832};{color}{color:#cc7832} if {color}({color:#9876aa}log{color}.isDebugEnabled()) {color:#9876aa}log{color}.debug({color:#6a8759}"Failed to unmarshall cache object value for the event notification: " {color}+ e){color:#cc7832};{color}{color:#cc7832} {color} {color:#cc7832} if {color}(!{color:#9876aa}forceKeepBinary{color}) LT.warn({color:#9876aa}log{color}{color:#cc7832}, {color}{color:#6a8759}"Failed to unmarshall cache object value for the event notification " {color}+ {color:#6a8759}"(all further notifications will keep binary object format)."{color}){color:#cc7832};{color} {color:#9876aa} forceKeepBinary {color}= {color:#cc7832}true;{color} key0 = {color:#9876aa}cctx{color}.cacheObjectContext().unwrapBinaryIfNeeded(key{color:#cc7832}, true, false{color}){color:#cc7832};{color} val0 = {color:#9876aa}cctx{color}.cacheObjectContext().unwrapBinaryIfNeeded(newVal{color:#cc7832}, true, false{color}){color:#cc7832};{color} oldVal0 = {color:#9876aa}cctx{color}.cacheObjectContext().unwrapBinaryIfNeeded(oldVal{color:#cc7832}, true, false{color}){color:#cc7832};{color} } -- This message was sent by Atlassian Jira (v8.3.4#803005)