简体   繁体   English

ISPN000217 同时将数据添加到 infinispan 缓存

[英]ISPN000217 while adding data to infinispan cache

I have an application running on 4 nodes inside 2 clusters.我有一个应用程序在 2 个集群内的 4 个节点上运行。 The application is having cache configured using infinispan and SpringEmbeddedCacheManager.应用程序正在使用 infinispan 和 SpringEmbeddedCacheManager 配置缓存。 I am getting an intermittent issue while I am trying to add data to cache, please note that I am adding data as key value pair where my value will be always custom class created.我在尝试将数据添加到缓存时遇到间歇性问题,请注意,我将数据添加为键值对,其中我的值将始终是创建的自定义类。

I just tried to change the cache type to replicated, local and invalidated, I have observed that I am not having issue when using local or invalidated cache.我只是尝试将缓存类型更改为复制、本地和无效,我观察到在使用本地或无效缓存时没有问题。 Can anyone confirm if large object in distributed cache cause any issue.任何人都可以确认分布式缓存中的大对象是否会导致任何问题。

Infinispan Config Infinispan 配置

<distributed-cache name="apigw-access-cache" owners="1" segments="20" mode="SYNC" statistics="false">
    <eviction max-entries="10" strategy="LIRS"/>
    <expiration max-idle="360000" lifespan="3600000"/>
</distributed-cache>

Infinispan Version Infinispan 版本

   <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-spring4</artifactId>
            <version>7.0.3.Final</version><!--$NO-MVN-MAN-VER$ -->
        </dependency>

        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-cli-server</artifactId>
            <version>7.0.0.CR1</version>
        </dependency>

Errors错误

2019-12-04 09:44:23.361 [qtp1933072581-15447] ERROR o.i.i.InvocationContextInterceptor - ISPN000136: Execution error
org.infinispan.remoting.RemoteException: ISPN000217: Received exception from node-10097-32028, see cause for remote stack trace
    at org.infinispan.remoting.transport.AbstractTransport.checkResponse(AbstractTransport.java:44) ~[infinispan-core-7.0.3.Final.jar!/:7.0.3.Final]
    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processSingleCall(CommandAwareRpcDispatcher.java:381) ~[infinispan-core-7.0.3.Final.jar!/:7.0.3.Final]
    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:167) ~[infinispan-core-7.0.3.Final.jar!/:7.0.3.Final]
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:560) ~[infinispan-core-7.0.3.Final.jar!/:7.0.3.Final]
    at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:290) ~[infinispan-core-7.0.3.Final.jar!/:7.0.3.Final]

Caused by: java.lang.IllegalArgumentException: Can not set java.util.Set field Class.field to java.lang.String
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[na:1.8.0_121]
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[na:1.8.0_121]
    at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) ~[na:1.8.0_121]
    at java.lang.reflect.Field.set(Field.java:764) ~[na:1.8.0_121]
Caused by: org.infinispan.commons.CacheException: Problems invoking command.
    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:221)
    at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460)
    at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377)

Caused by: org.infinispan.commons.CacheException: Problems invoking command.
    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:221) ~[infinispan-core-7.0.3.Final.jar!/:7.0.3.Final]
    at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460) ~[jgroups-3.6.1.Final.jar!/:3.6.1.Final]
    at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377) ~[jgroups-3.6.1.Final.jar!/:3.6.1.Final]

First off, you should not be using such an old version of Infinispan, you should upgrade to 9.4.17.Final首先,您不应该使用如此旧版本的 Infinispan,您应该升级到 9.4.17.Final

The stack trace fragments don't appear to be in the right order, but Can not set java.util.Set field Class.field to java.lang.String is because you two nodes have different versions of the same class.堆栈跟踪片段的顺序似乎不正确,但Can not set java.util.Set field Class.field to java.lang.String是因为您两个节点具有同一类的不同版本。

The biggest difference between distributed and invalidation caches is that distributed caches replicate values to other nodes, while invalidation caches send an invalidation message that includes only the key.分布式缓存和失效缓存的最大区别在于分布式缓存将值复制到其他节点,而失效缓存发送仅包含键的失效消息。 If an invalidation cache works, then the problem is almost certainly that one of your value classes has changed and one of the nodes still has the old version.如果失效缓存有效,那么问题几乎可以肯定是您的值类之一已更改并且其中一个节点仍然具有旧版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Infinispan - 没有删除缓存的选项吗? - Infinispan - is there no option to delete a cache? Infinispan 缓存放置不在循环中工作 - Infinispan cache put is not working in loop Spring Session 的推荐 Infinispan 缓存模式 - Recommended Infinispan cache mode for Spring Session Infinispan + Spring 启动 - 不缓存 - Infinispan + Spring Boot - Doesn't Cache springboot + infinispan 失效模式:如何与共享缓存存储一起使用? - springboot + infinispan invalidation mode : How can used with shared cache storage? Spring 引导应用程序的 Hibernate 缓存(Infinispan,Hazelcast,理想可扩展) - Hibernate Cache for Spring Boot Application (Infinispan, Hazelcast, ideally scalable) 使用@Cacheable Spring批注并手动添加到Infinispan Cache - Using @Cacheable Spring annotation and manually add to Infinispan Cache Infinispan 集群 REPL_ASYNC 缓存:命令在两个节点之间无限期弹跳 - Infinispan clustered REPL_ASYNC cache: command indefinitely bounced between two nodes infinispan 缓存可以在使用 hibernate 的同一 Spring Boot 应用程序的多个实例之间共享吗? - Can the infinispan cache be shared among multiple instances of the same spring boot application using hibernate? 尝试使用 Spring boot 在 redis 缓存中插入数据时,出现一些运行时错误 - While trying to insert data in redis cache using Spring boot, getting some runtime error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM