Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16270

Non indexed delete statement fails with MarshallingException

XMLWordPrintable

      I'm experimenting with queries to improve performance in Keycloak but, I'm hitting a roadblock.
      I'm using the simple tutorials to reproduce the issue since it is easier to analyze.

      Just remove the indexed configuration from https://github.com/infinispan/infinispan-simple-tutorials/blob/759f59c7959416560eca422ba37cdf8c83bb75a0/infinispan-remote/query/src/main/resources/indexedCache.xml#L6-L9

      What is observed:

      == Query on values
      [Person[firstName=Hermione, lastName=Granger, bornYear=1990, bornIn=London]]
      == Query by key values
      []
      == Query with key and values projection
      [PersonDTO[pseudo=null, fullName=Hermione Granger], PersonDTO[pseudo=null, fullName=Draco Malfoy], PersonDTO[pseudo=null, fullName=Ron Wesley]]
      == DELETE count:0
      
      • Query by key's field does not find anything.
      • Projecting the key field returns null.
      • Delete does not find or remove the entry.

      Using the following delete statement fails more drastic:

            query = peopleCache.query("DELETE FROM tutorial.Person p where p.firstName = 'Hermione'");
            System.out.println("== DELETE count:" + query.execute().count().value());
      

      Client side

      Exception in thread "main" org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=20 returned server error (status=0x85): org.infinispan.commons.marshall.MarshallingException: No marshaller registered for Protobuf type tutorial.PersonKey
      	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
      	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
      	at org.infinispan.client.hotrod.impl.Util.await(Util.java:52)
      	at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeRemotely(RemoteQuery.java:108)
      	at org.infinispan.client.hotrod.impl.query.RemoteQuery.execute(RemoteQuery.java:66)
      	at org.infinispan.client.hotrod.impl.query.RemoteQuery.execute(RemoteQuery.java:29)
      	at org.infinispan.tutorial.simple.remote.query.InfinispanRemoteQuery.main(InfinispanRemoteQuery.java:105)
      
      

      Server side

      2024-07-05 13:54:48,682 ERROR [o.i.s.h.BaseRequestProcessor] ISPN005003: Exception reported org.infinispan.commons.marshall.MarshallingException: No marshaller registered for Protobuf type tutorial.PersonKey
      	at org.infinispan.encoding.ProtostreamTranscoder.unmarshallCascading(ProtostreamTranscoder.java:142)
      	at org.infinispan.encoding.ProtostreamTranscoder.unmarshall(ProtostreamTranscoder.java:123)
      	at org.infinispan.encoding.ProtostreamTranscoder.doTranscode(ProtostreamTranscoder.java:89)
      	at org.infinispan.commons.dataconversion.AbstractTranscoder.transcode(AbstractTranscoder.java:62)
      	at org.infinispan.encoding.DataConversion.fromStorage(DataConversion.java:216)
      	at org.infinispan.query.core.impl.EmbeddedQuery$DeleteFunction.apply(EmbeddedQuery.java:151)
      	at org.infinispan.query.core.impl.EmbeddedQuery$DeleteFunction.apply(EmbeddedQuery.java:143)
      span.query.core.impl.EmbeddedQuery$DeleteFunction.apply(EmbeddedQuery.java:151)
      	at org.infinispan.query.core.impl.EmbeddedQuery$DeleteFunction.apply(EmbeddedQuery.java:143)
      ...
      

            pruivo@redhat.com Pedro Ruivo
            pruivo@redhat.com Pedro Ruivo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: