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

Binary object might be deserialized unexpectedly when cache store is enabled.

    XMLWordPrintableJSON

Details

    • Important

    Description

      Problem
      See GridCacheMapEntry class. There are lots of calls to store like this:

      cctx.store().put(null, keyValue(false), CU.value(val, cctx, false), ver);
      

      When keyValue() is called, it might force object deserialization. And if there is no class on the server, the following exception might appear:

      g.apache.ignite.binary.BinaryInvalidTypeException: XXX
      	at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:558) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1442) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:542) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:117) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.cache.GridCacheMapEntry.keyValue(GridCacheMapEntry.java:1261) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.cache.GridCacheMapEntry.initialValue(GridCacheMapEntry.java:3326) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl$IsolatedUpdater.receive(DataStreamerImpl.java:1598) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.datastreamer.DataStreamerUpdateJob.call(DataStreamerUpdateJob.java:140) ~[ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.datastreamer.DataStreamProcessor.processRequest(DataStreamProcessor.java:304) [ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.datastreamer.DataStreamProcessor.access$000(DataStreamProcessor.java:49) [ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.processors.datastreamer.DataStreamProcessor$1.onMessage(DataStreamProcessor.java:79) [ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:822) [ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.managers.communication.GridIoManager.access$1600(GridIoManager.java:103) [ignite-core-1.5.7.jar:1.5.7]
      	at org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:785) [ignite-core-1.5.7.jar:1.5.7]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_51]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_51]
      

      Proposed solution
      Pass key and value directly to store manager. It should already handle everything correctly.

      Attachments

        Activity

          People

            vozerov Vladimir Ozerov
            vozerov Vladimir Ozerov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: