putForExternalRead not silent on remote node
--------------------------------------------
Key: JBCACHE-1198
URL:
http://jira.jboss.com/jira/browse/JBCACHE-1198
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Clustering
Affects Versions: 2.1.0.BETA1
Reporter: Brian Stansberry
Assigned To: Manik Surtani
Seeing WARN logging like this when using PFER with a replicating cache:
22:16:37,931 WARN pessimistic-shared:2839 - replication failure with method_call
MethodName: _putForExternalRead; MethodIdInteger: 45; Args: (null,
/test/com/foo/test/ENTITY/KEY, item, VALUE1) exception
org.jboss.cache.lock.TimeoutException: failure acquiring lock:
fqn=/test/com/foo/test/ENTITY/KEY, caller=Thread[Multiplexer-2,5,MultiplexerThreads],
lock=write owner=GlobalTransaction:<192.168.1.145:35562>:1 (activeReaders=0,
activeWriter=Thread[Thread-7,5,main], waitingReaders=1, waitingWriters=0,
waitingUpgrader=0)
at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:528)
at
org.jboss.cache.interceptors.PessimisticLockInterceptor$LockManager.acquire(PessimisticLockInterceptor.java:598)
at
org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:412)
at
org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:348)
at
org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:185)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
at
org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
at
org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:299)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:131)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
at
org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:97)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
at
org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:62)
at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3958)
at org.jboss.cache.CacheImpl._replicate(CacheImpl.java:2826)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
at
org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:77)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:624)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:533)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:365)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:744)
at org.jgroups.JChannel.up(JChannel.java:1137)
at org.jgroups.mux.Multiplexer$Task.run(Multiplexer.java:999)
at org.jgroups.mux.Multiplexer$ExecuteTask.run(Multiplexer.java:1023)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.cache.lock.TimeoutException: write lock for
/test/com/foo/test/ENTITY/KEY could not be acquired after 0 ms. Locks: Read lock owners:
[]
Write lock owner: GlobalTransaction:<192.168.1.145:35562>:1
(caller=Thread[Multiplexer-2,5,MultiplexerThreads], lock info: write
owner=GlobalTransaction:<192.168.1.145:35562>:1 (activeReaders=0,
activeWriter=Thread[Thread-7,5,main], waitingReaders=1, waitingWriters=0,
waitingUpgrader=0))
at org.jboss.cache.lock.IdentityLock.acquireWriteLock0(IdentityLock.java:244)
at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:167)
at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:497)
... 33 more
Issue seems to be that the logic in CacheImpl.putForExternalRead that makes the call a
no-op if the node exists and sets the failSilently option otherwise never gets executed on
the remote node. Instead the call gets handled by _replicate which just passes the
MethodCall into the interceptor chain without setting any options.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira