[
https://jira.jboss.org/browse/ISPN-595?page=com.atlassian.jira.plugin.sys...
]
Rodrigo Faria updated ISPN-595:
-------------------------------
Steps to Reproduce:
Put the attached Test.java and config.xml both in a package called infinispan.
* Run Test.java in process1.
* When "Before lock" message shows, press enter to continue. The Lock acquired
message will be shown.
* Run Test.java in process2.
* When "Before lock" message shows, press enter to continue. The Lock acquired
message will not be shown since proces1 is holding the lock.
* Press enter in process1. Will take some seconds, then Commit Successful will be shown.
* In process2, instead of a Lock Acquired message as expected, the exception in the issue
description is thrown.
Note that if the following steps are used instead, the exception will not happen:
* Run Test.java in process1 and wait for "Before lock" message, but do not press
enter yet.
* Run Test.java in process2 and wait for "Before lock" message, but do not press
enter yet..
* Press enter in process1. The Lock acquired message will be shown.
* Press enter in process2 The Lock acquired message will not be shown since proces1 is
holding the lock.
* Press enter in process1. Commit Successful will be shown in process1 (instantly, without
the delay of the scenario above) and Lock Acquired message will be shown in process2.
* Press enter in process2. Commit Successful will be shown In process2.
Note also that if cache.put is commented from Test.java, the error does not reproduce and
everything works as expected.
was:
Put the attached Test.java and config.xml both in a package called infinispan.
* Run Test.java in process1.
* When "Before lock" message shows, press enter to continue. The Lock acquired
message will be shown.
* Run Test.java in process2.
* When "Before lock" message shows, press enter to continue. The Lock acquired
message will not be shown since proces1 is holding the lock.
* Press enter in process1. Will take some seconds, then Commit Successful will be shown.
* In process2, instead of a Commit Successful as expected, the exception in the issue
description is thrown.
Note that if the following steps are used instead, the exception will not happen:
* Run Test.java in process1 and wait for "Before lock" message, but do not press
enter yet.
* Run Test.java in process2 and wait for "Before lock" message, but do not press
enter yet..
* Press enter in process1. The Lock acquired message will be shown.
* Press enter in process2 The Lock acquired message will not be shown since proces1 is
holding the lock.
* Press enter in process1. Commit Successful will be shown in process1 (instantly, without
the delay of the scenario above) and Lock Acquired message will be shown in process2.
* Press enter in process2. Commit Successful will be shown In process2.
Note also that if cache.put is commented from Test.java, the error does not reproduce and
everything works as expected.
Replication timeout if lock acquired before other node join
-----------------------------------------------------------
Key: ISPN-595
URL:
https://jira.jboss.org/browse/ISPN-595
Project: Infinispan
Issue Type: Bug
Components: Locking and Concurrency
Affects Versions: 4.1.0.CR2
Reporter: Rodrigo Faria
Assignee: Manik Surtani
Attachments: config.xml, Test.java
If a node acquires a lock and then a another node joins in and tries to acquire the same
lock, a replication timeout exception occurs.
This does not have to do with lock timeout, since a much higher lockAcquisitionTimeout
was configured.
This is the exception stack trace:
14:00:52,015 [main] ERROR s.InvocationContextInterceptor - Execution error:
org.infinispan.util.concurrent.TimeoutException: Replication timeout for
myhostname-23359
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:421)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:100)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:124)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:229)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:216)
at
org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:199)
at
org.infinispan.interceptors.base.BaseRpcInterceptor.visitLockControlCommand(BaseRpcInterceptor.java:59)
at
org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:82)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.LockingInterceptor.visitLockControlCommand(LockingInterceptor.java:149)
at
org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:82)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
at
org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:147)
at
org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:82)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:171)
at
org.infinispan.interceptors.TxInterceptor.visitLockControlCommand(TxInterceptor.java:115)
at
org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:82)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:58)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:39)
at
org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:147)
at
org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:82)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:271)
at org.infinispan.CacheDelegate.lock(CacheDelegate.java:296)
at org.infinispan.CacheDelegate.lock(CacheDelegate.java:289)
at infinispan.Test.main(Test.java:30)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira