我使用Infinispan作为hibernate二级缓存。在正常负载系统中运行,没有问题。但是,当加载到系统中时,从缓存集群引发了以下异常。尽管这不会造成功能影响,但报告错误似乎是一个问题。
Infinispan版本:5.3
关于测试的更多信息:这个hibernate二级缓存集群有四个节点。在测试期间,我没有更新缓存(缓存中的实体没有更新)。在四个节点中,两个节点大量使用了缓存。但我在其他两个节点中看到了这个错误。
错误日志
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.interceptors.CallInterceptor - Executing command: RemoveCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@ac27701, value=null, flags=[SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP], ignorePreviousValue=false}.
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.commands.write.RemoveCommand - Nothing to remove since the entry is null or we have a null entry
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.remoting.rpc.RpcManagerImpl - cosmos-db2-30512 invoking RemoveCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@ac27701, value=null, flags=[SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP], ignorePreviousValue=false} to recipient list null with options RpcOptions{timeout=20000, unit=MILLISECONDS, fifoOrder=true, totalOrder=false, responseFilter=null, responseMode=SYNCHRONOUS, skipReplicationQueue=false}
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.remoting.transport.jgroups.JGroupsTransport - dests=null, command=SingleRpcCommand{cacheName='Order', command=RemoveCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@ac27701, value=null, flags=[SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP], ignorePreviousValue=false}}, mode=SYNCHRONOUS, timeout=20000
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher - Replication task sending SingleRpcCommand{cacheName='Order', command=RemoveCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@ac27701, value=null, flags=[SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP], ignorePreviousValue=false}} to single recipient cosmos-db2-29372 with response mode GET_ALL
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.marshall.AdaptiveBufferSizePredictor - Next predicted buffer size for object type 'org.infinispan.commands.remote.SingleRpcCommand' will be 1536
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.marshall.VersionAwareMarshaller - Wrote version 510
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Start unmarshaller after retrieving marshaller from thread local
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.VersionAwareMarshaller - Read version 510
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.marshall.AdaptiveBufferSizePredictor - Next predicted buffer size for object type 'org.infinispan.commands.remote.SingleRpcCommand' will be 512
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Start unmarshaller after retrieving marshaller from factory
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.VersionAwareMarshaller - Read version 510
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Stop unmarshaller
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.marshall.VersionAwareMarshaller - Wrote version 510
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Stop unmarshaller
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher - Attempting to execute command: SingleRpcCommand{cacheName='Order', command=PutKeyValueCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2, value=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=2022, array=0x0301fe0409000000..}, cachedHashCode=1103892469}@40c6375, flags=[ZERO_LOCK_ACQUISITION_TIMEOUT, FORCE_ASYNCHRONOUS, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, PUT_FOR_EXTERNAL_READ], putIfAbsent=true, metadata=EmbeddedMetadata{version=null}, successful=true}} [sender=cosmos-db2-29372]
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Stop marshaller
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [remote-thread-0] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Stop marshaller
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.remoting.InboundInvocationHandlerImpl - Calling perform() on SingleRpcCommand{cacheName='Order', command=PutKeyValueCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2, value=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=2022, array=0x0301fe0409000000..}, cachedHashCode=1103892469}@40c6375, flags=[ZERO_LOCK_ACQUISITION_TIMEOUT, FORCE_ASYNCHRONOUS, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, PUT_FOR_EXTERNAL_READ], putIfAbsent=true, metadata=EmbeddedMetadata{version=null}, successful=true}}
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.commands.remote.BaseRpcInvokingCommand - Invoking command PutKeyValueCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2, value=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=2022, array=0x0301fe0409000000..}, cachedHashCode=1103892469}@40c6375, flags=[ZERO_LOCK_ACQUISITION_TIMEOUT, FORCE_ASYNCHRONOUS, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, PUT_FOR_EXTERNAL_READ], putIfAbsent=true, metadata=EmbeddedMetadata{version=null}, successful=true}, with originLocal flag set to false
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.interceptors.InvocationContextInterceptor - Invoked with command PutKeyValueCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2, value=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=2022, array=0x0301fe0409000000..}, cachedHashCode=1103892469}@40c6375, flags=[ZERO_LOCK_ACQUISITION_TIMEOUT, FORCE_ASYNCHRONOUS, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, PUT_FOR_EXTERNAL_READ], putIfAbsent=true, metadata=EmbeddedMetadata{version=null}, successful=true} and InvocationContext [org.infinispan.context.impl.NonTxInvocationContext@49559866]
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Marshallable type 'org.infinispan.marshall.MarshalledValue' known and is marshallable=true
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Marshallable type 'org.infinispan.marshall.MarshalledValue' known and is marshallable=true
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.statetransfer.StateTransferInterceptor - handleTopologyAffectedCommand for command PutKeyValueCommand{key=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2, value=MarshalledValue{instance=<serialized>, serialized=ByteArray{size=2022, array=0x0301fe0409000000..}, cachedHashCode=1103892469}@40c6375, flags=[ZERO_LOCK_ACQUISITION_TIMEOUT, FORCE_ASYNCHRONOUS, SKIP_CACHE_LOAD, SKIP_REMOTE_LOOKUP, PUT_FOR_EXTERNAL_READ], putIfAbsent=true, metadata=EmbeddedMetadata{version=null}, successful=true}
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor - Are (cosmos-db2-30512) we the lock owners for key 'MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2'? true
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.util.concurrent.locks.LockManagerImpl - Attempting to lock MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2 with acquisition timeout of 0 millis
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.util.concurrent.locks.containers.ReentrantPerEntryLockContainer - Timed out attempting to acquire lock for key MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2 after 0 milliseconds
2015-03-09 11:33:07 DEBUG [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.util.concurrent.locks.LockManagerImpl - Failed to acquire lock MarshalledValue{instance=<serialized>, serialized=ByteArray{size=1267, array=0x0301fe0409000000..}, cachedHashCode=1519}@545404b2, owner is Thread[remote-thread-0,5,main]
2015-03-09 11:33:07 DEBUG [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.util.concurrent.locks.LockManagerImpl - This transaction (Thread[Incoming-1,cosmos-db2-30512,5,main]) already owned locks []
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Start unmarshaller after retrieving marshaller from thread local
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.VersionAwareMarshaller - Read version 510
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Stop unmarshaller
2015-03-09 11:33:07 ERROR [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.interceptors.InvocationContextInterceptor - ISPN000136: Execution error
org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [0 milliseconds] on key [Order#1] for requestor [Thread[Incoming-1,cosmos-db2-30512,5,main]]! Lock held by [Thread[remote-thread-0,5,main]]
at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:214)
at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLockNoCheck(LockManagerImpl.java:197)
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:149)
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:145)
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:69)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:154)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216)
at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:194)
at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:136)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:160)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:111)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.hibernate.cache.infinispan.impl.ClassLoaderAwareCache$ClassLoaderAwareCommandInterceptor.handleDefault(ClassLoaderAwareCache.java:79)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)
at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:61)
at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:70)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:122)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:205)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:111)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommandFromLocalCluster(CommandAwareRpcDispatcher.java:281)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:233)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:247)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:667)
at org.jgroups.JChannel.up(JChannel.java:730)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1019)
at org.jgroups.stack.Protocol.up(Protocol.java:409)
at org.jgroups.protocols.RSVP.up(RSVP.java:221)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:182)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:434)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:434)
at org.jgroups.stack.Protocol.up(Protocol.java:409)
at org.jgroups.protocols.SEQUENCER.up(SEQUENCER.java:270)
at org.jgroups.stack.Protocol.up(Protocol.java:409)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:294)
at org.jgroups.protocols.UNICAST3.removeAndDeliver(UNICAST3.java:792)
at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:704)
at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:382)
at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:600)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)
at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:184)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:301)
at org.jgroups.protocols.MERGE3.up(MERGE3.java:303)
at org.jgroups.protocols.Discovery.up(Discovery.java:379)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1405)
at org.jgroups.protocols.TP$MyHandler.run(TP.java:1591)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2015-03-09 11:33:07 ERROR [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.remoting.InboundInvocationHandlerImpl - Exception executing command
org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [0 milliseconds] on key [Order#1] for requestor [Thread[Incoming-1,cosmos-db2-30512,5,main]]! Lock held by [Thread[remote-thread-0,5,main]]
at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:214)
at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLockNoCheck(LockManagerImpl.java:197)
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:149)
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:145)
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:69)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:154)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216)
at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:194)
at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:136)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:160)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:111)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.hibernate.cache.infinispan.impl.ClassLoaderAwareCache$ClassLoaderAwareCommandInterceptor.handleDefault(ClassLoaderAwareCache.java:79)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:54)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:83)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)
at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:61)
at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:70)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:122)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:205)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:111)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommandFromLocalCluster(CommandAwareRpcDispatcher.java:281)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:233)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:247)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:667)
at org.jgroups.JChannel.up(JChannel.java:730)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1019)
at org.jgroups.stack.Protocol.up(Protocol.java:409)
at org.jgroups.protocols.RSVP.up(RSVP.java:221)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:182)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:434)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:434)
at org.jgroups.stack.Protocol.up(Protocol.java:409)
at org.jgroups.protocols.SEQUENCER.up(SEQUENCER.java:270)
at org.jgroups.stack.Protocol.up(Protocol.java:409)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:294)
at org.jgroups.protocols.UNICAST3.removeAndDeliver(UNICAST3.java:792)
at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:704)
at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:382)
at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:600)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)
at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:184)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:301)
at org.jgroups.protocols.MERGE3.up(MERGE3.java:303)
at org.jgroups.protocols.Discovery.up(Discovery.java:379)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1405)
at org.jgroups.protocols.TP$MyHandler.run(TP.java:1591)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [Incoming-1,cosmos-db2-30512] org.infinispan.remoting.InboundInvocationHandlerImpl - Unable to execute command, got invalid response ExceptionResponse
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [OOB-4,cosmos-db2-30512] org.infinispan.marshall.jboss.AbstractJBossMarshaller - Start unmarshaller after retrieving marshaller from thread local
2015-03-09 11:33:07 TRACE [tid=cosmos-db2-150309112549721-1602836942-0-1] [OOB-4,cosmos-db2-30512] org.infinispan.marshall.VersionAwareMarshaller - Read version 510
Hibernate二级缓存配置
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:5.1"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd">
<global>
<globalJmxStatistics enabled="true" cacheManagerName="H2L" 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>
<!-- entity/collection caching that uses replication -->
<namedCache name="replicated-cache-entity">
<clustering mode="replication">
<stateTransfer fetchInMemoryState="false" timeout="20000"/>
<sync replTimeout="20000"/>
</clustering>
<!-- In distributed mode, Infinispan will store every entry on a subset of the nodes in the cache cluster
(controlled by the parameter numOwners, which controls how many owners each entry will have).
Theoretically reducing number of copies should increase the performance. Better to do a test with
mode distribution as well. -->
<!--<clustering mode="distribution">-->
<!--<sync replTimeout="20000"/>-->
<!--<hash numOwners="2" rehashEnabled="true"/>-->
<!--</clustering>-->
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
lockAcquisitionTimeout="15000" useLockStriping="false"/>
<!-- Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds.
0 means the eviction thread will never run. A separate executor is used for eviction in each cache. -->
<!-- maxEntries should be fine tune depend on the entities used to caching. Right now caching the events there fore
using a higher number -->
<eviction maxEntries="1000" strategy="LRU"/>
<expiration maxIdle="100000" wakeUpInterval="5000"/>
<storeAsBinary enabled="true"/>
<!--<transaction useSynchronization="true"
transactionMode="TRANSACTIONAL" autoCommit="false"
lockingMode="OPTIMISTIC"/>-->
</namedCache>
</infinispan>
谢谢你的帮助。
TimeoutException在这里是预期的,不会被认为是一个问题。因此,大概不应该在ERROR级别记录任何内容。
在这里,集群模式用作“复制”,但通常不是推荐的选择。我能够通过将集群模式更改为“无效”来克服这个问题。这是一个很好的选择,因此我的缓存是重读的。“无效”模式无法与hibernate-infinispan-4.1.19一起正常工作。最终版本(这是Infinispan 5.3的默认版本)。hibernate-infinispan-4.2.18。最终版本可以在“无效”模式下正常工作。通过更新hibernate-infinispan版本设法克服了这个问题。
您的配置没有什么真正的问题,这些超时在负载下定期发生(锁已满足,请求失败)。Hibernate在调用缓存时发生异常。在原始节点上放置()(或transaction.commit()),并通过重试进行处理,或者只是不缓存此值。
你是对的,这些常规情况不应该被报告为错误。
我正在用SpringDataJPA开发SpringBoot2.3.4Web应用程序。 我想将Hibernate 2级查询缓存用于带有@EntityGraph的存储库方法。但是,如果数据已经在2级缓存中,除非打开了Spring的Open Session in view,否则在生成Thymeleaf视图时会出现LazyInitializationException。当第一次从数据库中获取数据或不使用二
我有一个关于内存系统遵循的策略的基本问题。 考虑一个具有私有L1和L2缓存的核心。在L2缓存之后,我们有一个相干流量运行的总线。现在,如果从L2高速缓存中逐出地址(X)的高速缓存行,是否有必要从L1高速缓存中逐出该地址?? 逐出的原因可能是它有助于保持一致性协议的不变[如果l2中的一行显示无效,则此核心不包含此地址]。
当你使用本地(在内存中)缓存时,服务器可以缓存一些信息并快速地检索它,但是其他服务器不能访问这个缓存数据,他们需要到数据库中查询同样的信息。 如果你喜欢使用分布式缓存让其他服务器访问缓存的数据,由于它有一些序列化/反序列化和网络延迟开销,则需要注意:在某些情况下,它可能会降低性能。 缓存需要处理的另一个问题:缓存失效。 There are only two hard things in Compu
本文向大家介绍Android中使用二级缓存、异步加载批量加载图片完整案例,包括了Android中使用二级缓存、异步加载批量加载图片完整案例的使用技巧和注意事项,需要的朋友参考一下 一、问题描述 Android应用中经常涉及从网络中加载大量图片,为提升加载速度和效率,减少网络流量都会采用二级缓存和异步加载机制,所谓二级缓存就是通过先从内存中获取、再从文件中获取,最后才会访问网络。内存缓存(一级)本质
如果我有这门课: 我用这段代码对上面的内容进行计算: 我知道CPU只从一级缓存加载它所需的数据,但当一级缓存从二级缓存检索数据时,它会加载整个“缓存线”(可能包含一些它不需要的字节数据)。 二级缓存从三级缓存加载多少数据,三级缓存从主存加载多少数据?它是根据页面定义的吗?如果是,根据不同的二级/三级缓存大小,这个答案会有什么不同?
1、一级缓存:指的是mybatis中sqlSession对象的缓存,当我们执行查询以后,查询的结果会同时存入sqlSession中,再次查询的时候,先去sqlSession中查询,有的话直接拿出,当sqlSession消失时,mybatis的一级缓存也就消失了,当调用sqlSession的修改、添加、删除、commit()、close()等方法时,会清空一级缓存。 2、二级缓存:指的是mybati