Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-4989

CQ reply message fromData method deserializes query results

    XMLWordPrintableJSON

Details

    Description

      Recent changes in DataSerializableFixedID serialization have left CQ reply message handling in a bad state. When results are read they are deserialized into POJOs and this can cause queries to hang if the domain classes aren't available in the server. Even if they are it will hit performance because the objects are completely deserialized and then have to be re-serialized to be sent to clients.

      If the classes aren't available an exception like this will be thrown:

      org.apache.geode.SerializationException: Could not create an instance of  org.apache.geode.distributed.internal.streaming.StreamingOperation$StreamingReplyMessage .
      	at org.apache.geode.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2505)
      	at org.apache.geode.internal.DSFIDFactory.create(DSFIDFactory.java:994)
      	at org.apache.geode.internal.InternalDataSerializer.readDSFID(InternalDataSerializer.java:2703)
      	at org.apache.geode.internal.tcp.Connection.processNIOBuffer(Connection.java:3543)
      	at org.apache.geode.internal.tcp.Connection.runNioReader(Connection.java:1827)
      	at org.apache.geode.internal.tcp.Connection.run(Connection.java:1688)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.geode.SerializationException: Could not create an instance of  org.apache.geode.cache.query.internal.CqEntry .
      	at org.apache.geode.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2505)
      	at org.apache.geode.internal.DSFIDFactory.create(DSFIDFactory.java:994)
      	at org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2862)
      	at org.apache.geode.DataSerializer.readObject(DataSerializer.java:2961)
      	at org.apache.geode.internal.InternalDataSerializer.readUserObject(InternalDataSerializer.java:2817)
      	at org.apache.geode.distributed.internal.streaming.StreamingOperation$StreamingReplyMessage.fromData(StreamingOperation.java:559)
      	at org.apache.geode.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2494)
      	... 8 more
      Caused by: org.apache.geode.pdx.PdxSerializationException: Could not create an instance of a class util.PdxVersionedQueryObject
      	at org.apache.geode.pdx.internal.PdxType.getPdxClass(PdxType.java:239)
      	at org.apache.geode.pdx.internal.PdxReaderImpl.basicGetObject(PdxReaderImpl.java:687)
      	at org.apache.geode.pdx.internal.PdxReaderImpl.getObject(PdxReaderImpl.java:682)
      	at org.apache.geode.internal.InternalDataSerializer.readPdxSerializable(InternalDataSerializer.java:3226)
      	at org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:3031)
      	at org.apache.geode.DataSerializer.readObject(DataSerializer.java:2961)
      	at org.apache.geode.cache.query.internal.CqEntry.fromData(CqEntry.java:95)
      	at org.apache.geode.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2494)
      	... 14 more
      Caused by: java.lang.ClassNotFoundException: util.PdxVersionedQueryObject
      	at org.apache.geode.internal.ClassPathLoader.forName(ClassPathLoader.java:170)
      	at org.apache.geode.internal.InternalDataSerializer.getCachedClass(InternalDataSerializer.java:3870)
      	at org.apache.geode.pdx.internal.PdxType.getPdxClass(PdxType.java:235)
      	... 21 more
      

      Attachments

        Issue Links

          Activity

            People

              bschuchardt Bruce J Schuchardt
              bschuchardt Bruce J Schuchardt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h