Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12445

When Cache Metrics are switched on (statisticsEnabled = true) the empty cache events arrive to the client nodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • 2.7.6
    • None
    • general
    • None
    • OS Name Microsoft Windows 10 Pro
      java version "1.8.0_231"
      java version OpenJDK 64-Bit Server VM 11+28

    • Docs Required, Release Notes Required

    Description

      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 (Sometimes 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. 

      catch (Exception e) {
        if (!cctx.cacheObjectContext().kernalContext().cacheObjects().isBinaryEnabled(cctx.config()))
          throw e;  if (log.isDebugEnabled())
           log.debug("Failed to unmarshall cache object value for the event notification: " + e); 

        if (!forceKeepBinary)
          LT.warn(log, "Failed to unmarshall cache object value for the event notification " +
                   "(all further notifications will keep binary object format)."); 

        forceKeepBinary = true; 

        key0 = cctx.cacheObjectContext().unwrapBinaryIfNeeded(key, true, false); 

        val0 = cctx.cacheObjectContext().unwrapBinaryIfNeeded(newVal, true, false); 

        oldVal0 = cctx.cacheObjectContext().unwrapBinaryIfNeeded(oldVal, true, false);

      }

      Attachments

        1. Events.zip
          96 kB
          Roman Koriakov

        Activity

          People

            rkoriakov Roman Koriakov
            rkoriakov Roman Koriakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: