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

Remote Cache Store does does't work properly in compatibility mode

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 9.0.0.Final
    • Loaders and Stores
    • None

      Currently we can't use Remote Cache Store for Caches populated using REST with compatibility mode.

      The configuration for source cache looks like the following:

      <distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
        <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
        <transaction mode="NONE"/>
        <compatibility enabled="true" />
      </distributed-cache>
      

      Destination cache:

      <distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
        <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
        <transaction mode="NONE"/>
        <compatibility enabled="true" />
        <remote-store cache="default" hotrod-wrapping="true" read-only="true">
          <remote-server outbound-socket-binding="remote-store-hotrod-server" />
        </remote-store>
      </distributed-cache>
      

      With the configuration above, when performing Rolling Upgrade procedure I get:

      03:38:43,025 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (nioEventLoopGroup-7-1) ISPN000136: Error executing command GetCacheEntryCommand, writing keys []: java.lang.ClassCastException: java.lang.String cannot be cast to [B
      	at org.infinispan.persistence.remote.wrapper.HotRodEntryMarshaller.objectToByteBuffer(HotRodEntryMarshaller.java:28)
      	at org.infinispan.client.hotrod.impl.RemoteCacheImpl.obj2bytes(RemoteCacheImpl.java:494)
      	at org.infinispan.client.hotrod.impl.RemoteCacheImpl.getWithMetadata(RemoteCacheImpl.java:208)
      	at org.infinispan.persistence.remote.RemoteStore.load(RemoteStore.java:109)
      	at org.infinispan.persistence.manager.PersistenceManagerImpl.loadFromAllStores(PersistenceManagerImpl.java:455)
      	at org.infinispan.persistence.PersistenceUtil.loadAndCheckExpiration(PersistenceUtil.java:113)
      	at org.infinispan.persistence.PersistenceUtil.lambda$loadAndStoreInDataContainer$0(PersistenceUtil.java:98)
      	at org.infinispan.container.DefaultDataContainer.lambda$compute$3(DefaultDataContainer.java:325)
      	at org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8.compute(EquivalentConcurrentHashMapV8.java:1873)
      	at org.infinispan.container.DefaultDataContainer.compute(DefaultDataContainer.java:324)
      	at org.infinispan.persistence.PersistenceUtil.loadAndStoreInDataContainer(PersistenceUtil.java:91)
      	at org.infinispan.interceptors.impl.CacheLoaderInterceptor.loadInContext(CacheLoaderInterceptor.java:352)
      	at org.infinispan.interceptors.impl.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:347)
      	at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:206)
      	at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitGetCacheEntryCommand(CacheLoaderInterceptor.java:150)
      	at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitGetCacheEntryCommand(CacheLoaderInterceptor.java:88)
      	at org.infinispan.commands.read.GetCacheEntryCommand.acceptVisitor(GetCacheEntryCommand.java:40)
      	at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:53)
      	at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.invokeInterceptorsSync(BaseAsyncInvocationContext.java:314)
      	at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.forkInvocationSync(BaseAsyncInvocationContext.java:98)
      	at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.invokeForkAndHandlerSync(BaseAsyncInvocationContext.java:474)
      	at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.afterVisit(BaseAsyncInvocationContext.java:463)
      	at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.invokeInterceptorsSync(BaseAsyncInvocationContext.java:329)
      	at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.invokeSync(BaseAsyncInvocationContext.java:282)
      	at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:236)
      	at org.infinispan.cache.impl.CacheImpl.getCacheEntry(CacheImpl.java:433)
      	at org.infinispan.cache.impl.CacheImpl.getCacheEntry(CacheImpl.java:439)
      	at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.getCacheEntry(AbstractDelegatingAdvancedCache.java:216)
      	at org.infinispan.rest.RestCacheManager.getInternalEntry(RestCacheManager.scala:58)
      	at org.infinispan.rest.Server$$anonfun$getEntry$1.apply(Server.scala:90)
      	at org.infinispan.rest.Server$$anonfun$getEntry$1.apply(Server.scala:89)
      	at org.infinispan.rest.Server.protectCacheNotFound(Server.scala:498)
      	at org.infinispan.rest.Server.getEntry(Server.scala:89)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
      	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
      	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
      	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
      	at org.jboss.resteasy.plugins.server.netty.RequestDispatcher.service(RequestDispatcher.java:83)
      	at org.jboss.resteasy.plugins.server.netty.RequestHandler.channelRead0(RequestHandler.java:53)
      	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      	at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:83)
      	at io.netty.channel.DefaultChannelHandlerInvoker$7.run(DefaultChannelHandlerInvoker.java:159)
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:339)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:373)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
      	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:145)
      	at java.lang.Thread.run(Thread.java:745)
      

              ttarrant@redhat.com Tristan Tarrant
              slaskawi@redhat.com Sebastian Ɓaskawiec (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: