Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-7371

[RESP] Error stacktrace on WRONGTYPE

XMLWordPrintable

    • False
    • None
    • False

      Attempt to use a command against incorrect data type correctly detects WRONGTYPE and lets the user know through the API. Nevertheless it generates error stacktrace on the server side with cast class exception as well which seems to be unnecessary and rather confusing suggesting that there is unhandled exception on the server side.

      Redis CLI:

      127.0.0.1:11222> lpush list story
      (integer) 1
      127.0.0.1:11222> SMISMEMBER list story
      (error) WRONGTYPE Operation against a key holding the wrong kind of value
      

      Server log:

      2024-09-26 15:17:53,321 ERROR [o.i.i.i.InvocationContextInterceptor] ISPN000136: Error executing command ReadWriteKeyCommand on Cache 'respCache', writing keys [WrappedByteArray[\l\i\s\t (4 bytes)]] java.lang.ClassCastException: class org.infinispan.multimap.impl.ListBucket cannot be cast to class org.infinispan.multimap.impl.SetBucket (org.infinispan.multimap.impl.ListBucket and org.infinispan.multimap.impl.SetBucket are in unnamed module of loader java.net.URLClassLoader @7adf9f5f)
      	at org.infinispan.multimap.impl.function.set.SMIsMember.apply(SMIsMember.java:39)
      	at org.infinispan.multimap.impl.function.set.SMIsMember.apply(SMIsMember.java:27)
      	at org.infinispan.interceptors.impl.CallInterceptor.visitReadWriteKeyCommand(CallInterceptor.java:1015)
      	at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:91)
      	at org.infinispan.interceptors.impl.CallInterceptor.visitCommand(CallInterceptor.java:163)
      
      

              vrigamon@redhat.com Vittorio Rigamonti
              rhn-support-pdrobek Pavel Drobek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: