【问题标题】:Infinispan : Responses contains more than 1 not equal elementsInfinispan:响应包含超过 1 个不相等的元素
【发布时间】:2013-05-24 15:58:36
【问题描述】:

我使用 Infinispan 作为 L2 缓存,并且我有两个应用程序节点。复制两个应用程序中的 L2 缓存。这两个应用程序不相同。

我的一个应用使用 Web 服务填充数据库,而其他应用为数据库运行 GUI。

这两个应用程序都对数据库进行了广泛的读写。运行应用程序后,我看到以下错误。我不知道是什么导致了这个错误。

我想知道为什么 - 我的缓存实例未正确复制每个更改到其他实例

  • 二级缓存有两个休止符

  • L2 响应不相等

错误 org.infinispan.interceptors.InvocationContextInterceptor - ISPN000136:执行错误

2013-05-29 06:32:32 错误 - 处理事件时出现异常,原因:org.infinispan.loaders.CacheLoaderException:响应包含超过 1 个元素且这些元素不相等,因此无法确定哪一个使用:

[SuccessfulResponse{responseValue=TransientCacheValue{maxIdle=100000, lastUsed=1369809152081} TransientCacheValue {value=MarshalledValue{instance=, serialized=ByteArray{size=1911, array=0x0301fe0409000000..}, cachedHashCode=1816114786}}}@57991642 ,

SuccessfulResponse{responseValue=TransientCacheValue{maxIdle=100000, lastUsed=1369809152116} TransientCacheValue {value=MarshalledValue{instance=, serialized=ByteArray{size=1911, array=0x0301fe0409000000..}, cachedHashCode=1816114786}@6cdaa731}}]

我的 Infinispan 配置是

    <globalJmxStatistics enabled="true" jmxDomain="org.infinispan" allowDuplicateDomains="true"/>

    <transport

            transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"

            clusterName="infinispan-hibernate-cluster"

            distributedSyncTimeout="50000"

            strictPeerToPeer="false">

        <properties>

            <property name="configurationFile" value="jgroups.xml"/>

        </properties>

    </transport>

</global>



<default>

</default>



<namedCache name="my-cache-entity">

    <clustering mode="replication">

        <stateRetrieval fetchInMemoryState="false" timeout="60000"/>

        <sync replTimeout="20000"/>

    </clustering>

    <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"

             lockAcquisitionTimeout="15000" useLockStriping="false"/>

    <eviction maxEntries="10000" strategy="LRU"/>

    <expiration maxIdle="100000" wakeUpInterval="5000"/>

    <lazyDeserialization enabled="true"/>

    <!--<transaction useSynchronization="true"

                 transactionMode="TRANSACTIONAL" autoCommit="false"

                 lockingMode="OPTIMISTIC"/>-->

    <loaders passivation="false" shared="false" preload="false">

        <loader class="org.infinispan.loaders.cluster.ClusterCacheLoader"

                fetchPersistentState="false"

                ignoreModifications="false" purgeOnStartup="false">

            <properties>

                <property name="remoteCallTimeout" value="20000"/>

            </properties>

        </loader>

    </loaders>

</namedCache>

【问题讨论】:

    标签: caching jboss infinispan cpu-cache


    【解决方案1】:

    复制的实体缓存应该配置状态检索,正如default Infinispan configuration file 中已经指出的那样,您已经这样做了。 ClusterCacheLoader 应该只在特殊情况下使用(用于查询缓存)。为什么不直接使用提供的默认 Infinsipan 配置?事实上,如果你不配置配置文件,它会使用默认的。

    【讨论】:

    • 谢谢高尔德。我将从实体缓存中删除 ClusterCacheLoader 并执行另一个测试周期。似乎我错误地配置了实体缓存。我不能使用默认配置,因为我正在考虑将我的 maxEntries 增加到 100,000 并且不使用跨国。此外,我认为lazyDeserialization 已被弃用,它应该是storeAsBinary。我也在考虑使用分发作为集群模式而不是复制。我认为它会提高性能,因为我的集群包含 6 个节点。
    猜你喜欢
    • 2021-11-10
    • 2021-12-20
    • 1970-01-01
    • 2019-08-05
    • 1970-01-01
    • 2015-04-19
    • 1970-01-01
    • 2019-04-24
    • 1970-01-01
    相关资源
    最近更新 更多