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

Subclasses of AbstractWriteKeyCommand don't marshal the Params params field

    XMLWordPrintable

Details

    • Hide

      For example, run the test at https://gist.github.com/ksobolew/74bb8ff6b321786e64a62ecd0e4c5878/664ca4f7e841fb13dad88a03aa0e0e94b36bda34; it was made for something else but it exhibits the failure in its #testLoadRemote test. In short: what you need is a write or read-write invocation of eval() in FunctionalAPI on a key of which the local node is not an owner.

      Show
      For example, run the test at https://gist.github.com/ksobolew/74bb8ff6b321786e64a62ecd0e4c5878/664ca4f7e841fb13dad88a03aa0e0e94b36bda34 ; it was made for something else but it exhibits the failure in its #testLoadRemote test. In short: what you need is a write or read-write invocation of eval() in FunctionalAPI on a key of which the local node is not an owner.

    Description

      I'm attempting to use the Functional API, but I'm unable to because of an exception like this:

      java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from FunctionalCachestoreTest-NodeB-820, see cause for remote stack trace
      at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
      at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
      (...)
      Caused by: java.lang.NullPointerException
      at org.infinispan.interceptors.CacheWriterInterceptor.visitWriteCommand(CacheWriterInterceptor.java:233)
      at org.infinispan.interceptors.CacheWriterInterceptor.visitReadWriteKeyCommand(CacheWriterInterceptor.java:215)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.interceptors.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:190)
      at org.infinispan.interceptors.CacheLoaderInterceptor.visitReadWriteKeyCommand(CacheLoaderInterceptor.java:331)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.interceptors.EntryWrappingInterceptor.invokeNextAndApplyChanges(EntryWrappingInterceptor.java:496)
      at org.infinispan.interceptors.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:561)
      at org.infinispan.interceptors.EntryWrappingInterceptor.visitReadWriteKeyCommand(EntryWrappingInterceptor.java:379)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:97)
      at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:41)
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitReadWriteKeyCommand(AbstractLockingInterceptor.java:160)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:343)
      at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:281)
      at org.infinispan.statetransfer.StateTransferInterceptor.visitReadWriteKeyCommand(StateTransferInterceptor.java:204)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113)
      at org.infinispan.commands.AbstractVisitor.visitReadWriteKeyCommand(AbstractVisitor.java:203)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
      at org.infinispan.commands.AbstractVisitor.visitReadWriteKeyCommand(AbstractVisitor.java:203)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113)
      at org.infinispan.commands.AbstractVisitor.visitReadWriteKeyCommand(AbstractVisitor.java:203)
      at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:90)
      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
      at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:43)
      at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:51)
      at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokePerform(BasePerCacheInboundInvocationHandler.java:92)
      at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:34)
      ... 3 more

      The line where the exception occurs is:

      Param<PersistenceMode> persistMode = command.getParams().get(PersistenceMode.ID);

      Turns out that command.getParams() returns null. Investigating further, it looks like the "params" field of ReadWriteKeyCommand is not marshaled; the receiver then unmarshals everythng except the "params" field, which remains null on the remote node, where the command fails.

      Attachments

        Issue Links

          Activity

            People

              rvansa1@redhat.com Radim Vansa (Inactive)
              ksobolewski_jira Krzysztof Sobolewski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: