Infinispan库模式复制的TreeCache removeNode抛出“ ISPN000456:缓存不包含原子映射”

时间:2018-07-26 15:36:18

标签: infinispan

我正在在Kubernetes上运行的分布式服务中使用带有Jgroups的Infinispan 9.2.5.Final库。

我知道我的分布式应用程序的复制TreeCache中的数据位于“ / live / policy”位置,因为该应用程序可以从中读取数据。该应用程序能够在缓存的其他位置(例如“ / temp”)执行写操作。但是,当如下所述删除节点时,它突然开始引发异常,如下所示。

这段代码过去一直有效,今天也可以在其他环境中使用。因此,在这种环境下,由于某种未知原因,似乎缓存已损坏。我正在尝试找出此错误的含义,是否有办法解决此错误,并尝试找出原因。任何帮助将不胜感激!

不幸的是,这在其他任何地方都无法重现,因为我正在生产中,所以我无权进行自定义缓存操作。

configsCacheInUse.removeNode("/live/policy");

引发异常:

InvocationContextInterceptor: ISPN000136: Error executing command VersionedPrepareCommand, writing keys [NodeKey{

STRUCTURE,fqn = / live},NodeKey {数据,fqn = / live / policy},NodeKey {STRUCTURE,fqn = / live / policy}] org.infinispan.remoting.RemoteException:ISPN000217 ....

Caused by: java.lang.IllegalStateException: ISPN000456: Cache does not contain the atomic map. at org.infinispan.atomic.impl.AtomicMapProxyImpl.mapDoesNotExist(AtomicMapProxyImpl.java:106) at java.util.Optional.orElseThrow(Optional.java:290) at org.infinispan.atomic.impl.AtomicMapProxyImpl.getMap(AtomicMapProxyImpl.java:110) at org.infinispan.atomic.impl.AtomicMapProxyImpl.access$700(AtomicMapProxyImpl.java:56) at org.infinispan.atomic.impl.AtomicMapProxyImpl$Clear.apply(AtomicMapProxyImpl.java:341) at org.infinispan.atomic.impl.AtomicMapProxyImpl$Clear.apply(AtomicMapProxyImpl.java:332) at org.infinispan.commands.functional.ReadWriteKeyCommand.perform(ReadWriteKeyCommand.java:100) at org.infinispan.interceptors.impl.CallInterceptor.visitCommand(CallInterceptor.java:29) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenApply(BaseAsyncInterceptor.java:76) at org.infinispan.interceptors.distribution.TxDistributionInterceptor.handleTxFunctionalCommand(TxDistributionInterceptor.java:517) at org.infinispan.interceptors.distribution.TxDistributionInterceptor.visitReadWriteKeyCommand(TxDistributionInterceptor.java:188) at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:110) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) at org.infinispan.interceptors.impl.EntryWrappingInterceptor$EntryWrappingVisitor.handleWriteCommand(EntryWrappingInterceptor.java:773) at org.infinispan.interceptors.impl.EntryWrappingInterceptor$EntryWrappingVisitor.visitReadWriteKeyCommand(EntryWrappingInterceptor.java:743) at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:110) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.applyModificationsAndThen(EntryWrappingInterceptor.java:830) at org.infinispan.interceptors.impl.EntryWrappingInterceptor.wrapEntriesForPrepareAndApply(EntryWrappingInterceptor.java:816) at org.infinispan.interceptors.impl.VersionedEntryWrappingInterceptor.visitPrepareCommand(VersionedEntryWrappingInterceptor.java:47) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:185) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) at org.infinispan.interceptors.impl.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:39) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:185) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lambda$new$0(AbstractTxLockingInterceptor.java:34) at org.infinispan.interceptors.InvocationSuccessFunction.apply(InvocationSuccessFunction.java:21) at org.infinispan.interceptors.SyncInvocationStage.addCallback(SyncInvocationStage.java:42) at org.infinispan.interceptors.InvocationStage.thenApply(InvocationStage.java:24) at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:53) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:185) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndHandle(BaseAsyncInterceptor.java:183) at org.infinispan.interceptors.impl.TxInterceptor.handlePrepareCommand(TxInterceptor.java:137) at org.infinispan.interceptors.impl.TxInterceptor.visitPrepareCommand(TxInterceptor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:185) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) at org.infinispan.interceptors.BaseAsyncInterceptor.lambda$new$0(BaseAsyncInterceptor.java:22) at org.infinispan.interceptors.InvocationSuccessFunction.apply(InvocationSuccessFunction.java:21) at org.infinispan.interceptors.impl.SimpleAsyncInvocationStage.addCallback(SimpleAsyncInvocationStage.java:69) at org.infinispan.interceptors.InvocationStage.thenApply(InvocationStage.java:24) at org.infinispan.interceptors.BaseAsyncInterceptor.asyncInvokeNext(BaseAsyncInterceptor.java:224) at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitCommand(TransactionSynchronizerInterceptor.java:46) at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndHandle(BaseAsyncInterceptor.java:185) at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:203) at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:69)

1 个答案:

答案 0 :(得分:0)

看起来像重新启动我的服务的所有Pod可能已解决此问题。重新启动后,旧锁很可能已被删除,复制成功。