[JBoss JIRA] (ISPN-2081) Transaction leak caused by reordering between prepare and commit
by Mircea Markus (JIRA)
Mircea Markus created ISPN-2081:
-----------------------------------
Summary: Transaction leak caused by reordering between prepare and commit
Key: ISPN-2081
URL: https://issues.jboss.org/browse/ISPN-2081
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.5.FINAL
Reporter: Mircea Markus
Assignee: Mircea Markus
Fix For: 5.2.0.ALPHA1, 5.2.0.FINAL
Attachments: RollbackNotSentBeforePrepareTest.java
There's no ordering between the prepare and commit/rollback messages, as the later are sent OOB.
With this in mind, the following transaction leak might happen:
Tx1 send prepare on nodes {A,B}
1. the message reaches A and timeouts but hasn't yet been processed on B
2. The transaction originator reacts immediately to the timeout received from A without waiting the response from B and sends a rollback request
3. The rollback request is processed on A and B
4. The initial prepare is then processed on B
At this point we have an orphan transaction prepare on B.
Whilst this is not causing any inconsistencies, it keeps keys locked indefinitely and is a memory leak.
The solution would be to wait at 2 for all the prepare messages *before* sending the rollback.
Attached is a unit test to reproduce the issue.
Related mailing list thread: http://infinispan.markmail.org/search/#query:%20list%3Aorg.jboss.lists.in...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (ISPN-1996) Failed to prepare view exceptions
by dex chen (JIRA)
dex chen created ISPN-1996:
------------------------------
Summary: Failed to prepare view exceptions
Key: ISPN-1996
URL: https://issues.jboss.org/browse/ISPN-1996
Project: Infinispan
Issue Type: Bug
Components: Core API
Affects Versions: 5.1.3.FINAL
Environment: ISPN 5.1.3.Final; Java 7; Cent OS
3-node cluster in replication mode using jgroups-tcp config.
Reporter: dex chen
Assignee: Manik Surtani
I saw lot (re-curring) cache view exceptions (below) when I start up a 3 node cluster.
I am running ISPN 5.1.3 final with replication mode, and jgroup-tcp config.
In this case, I start first 2 nodes first, and later try to join the 3rd node.
=======================================
2012-04-10/12:13:45.714/MDT
[CacheViewInstaller-3,portal1.net-1609] ERROR
org.infinispan.cacheviews.CacheViewsManagerImpl[263] - ISPN000172: Failed
to prepare view CacheView{viewId=832,
members=[portal1.net-1609, portal2.net-11982]}
for cache ispn-cipherkey, rolling back to view CacheView{viewId=831,
members=[portal1.net-1609]}
java.util.concurrent.ExecutionException: org.infinispan.CacheException:
java.lang.IllegalStateException: Cannot prepare new view
CacheView{viewId=832, members=[portal1.net-1609,
portal2.net-11982]} on cache ispn-cipherkey, we have already
committed view CacheView{viewId=844, members=[]}
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262)
at java.util.concurrent.FutureTask.get(FutureTask.java:119)
at
org.infinispan.cacheviews.CacheViewsManagerImpl.clusterPrepareView(CacheViewsManagerImpl.java:318)
at
org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:249)
at
org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:875)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.infinispan.CacheException: java.lang.IllegalStateException:
Cannot prepare new view CacheView{viewId=832,
members=[portal1.net-1609, portal2.net-11982]}
on cache ispn-cipherkey, we have already committed view
CacheView{viewId=844, members=[]}
at org.infinispan.util.Util.rewrapAsCacheException(Util.java:524)
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:172)
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:488)
at
org.infinispan.cacheviews.CacheViewsManagerImpl$2.call(CacheViewsManagerImpl.java:302)
at
org.infinispan.cacheviews.CacheViewsManagerImpl$2.call(CacheViewsManagerImpl.java:299)
... 5 more
Caused by: java.lang.IllegalStateException: Cannot prepare new view
CacheView{viewId=832, members=[portal1.net-1609,
portal2.net-11982]} on cache ispn-cipherkey, we have already
committed view CacheView{viewId=844, members=[]}
at
org.infinispan.cacheviews.CacheViewInfo.prepareView(CacheViewInfo.java:107)
at
org.infinispan.cacheviews.CacheViewsManagerImpl.handlePrepareView(CacheViewsManagerImpl.java:481)
at
org.infinispan.commands.control.CacheViewControlCommand.perform(CacheViewControlCommand.java:125)
at
org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:95)
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:221)
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:201)
at
org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:456)
at
org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:363)
at
org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:238)
at
org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:543)
at org.jgroups.JChannel.up(JChannel.java:716)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1026)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:181)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:418)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:400)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:882)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244)
at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:759)
at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:365)
at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:595)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:143)
at org.jgroups.protocols.FD.up(FD.java:273)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:282)
at org.jgroups.protocols.MERGE2.up(MERGE2.java:205)
at org.jgroups.protocols.Discovery.up(Discovery.java:359)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1174)
at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1722)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1704)
... 3 more
2012-04-10/12:13:46.715/MDT
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (ISPN-1731) Threads waiting for key locks should not block state transfer
by Dan Berindei (JIRA)
Dan Berindei created ISPN-1731:
----------------------------------
Summary: Threads waiting for key locks should not block state transfer
Key: ISPN-1731
URL: https://issues.jboss.org/browse/ISPN-1731
Project: Infinispan
Issue Type: Task
Components: State transfer
Affects Versions: 5.1.0.CR3, 5.0.1.FINAL
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 5.2.0.FINAL
A write/lock command holds the state transfer lock for its entire duration, including while waiting to acquire key locks. Because of this, we can get a deadlock scenario:
1. Tx1 waits for key k1 while holding the state transfer lock
2. State transfer waits for Tx1 while blocking new write commands
3. Tx2 waits for state transfer to end while holding the k1 lock
The only way out of this scenario at the moment is for Tx1 to time out and fail to acquire the lock. We should make it possible to release the state transfer lock temporarily and return to waiting for the key lock after state transfer has ended.
ISPN-1424 might make this issue obsolete.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (ISPN-1263) Allow a type safe selection of the cache used by the JCache interceptors
by Kevin Pollet (JIRA)
Allow a type safe selection of the cache used by the JCache interceptors
------------------------------------------------------------------------
Key: ISPN-1263
URL: https://issues.jboss.org/browse/ISPN-1263
Project: Infinispan
Issue Type: Feature Request
Components: CDI integration
Reporter: Kevin Pollet
Assignee: Kevin Pollet
Priority: Minor
Currently the name of the cache which will be used by the JCache interceptors has to be specified in JCache annotations (e.g {{@CacheResult(cacheName="greeting-cache"}}).
This can be error prone (typo, refactoring ...). The CDI integration module provides the possibility to associate a qualifier to a cache. This qualifier could be re-used to provide a type safe selection of the cache used by a JCache interceptor. Something like:
{code}
public class GreetingService {
@CacheResult @GreetingCache
public String greet(String name) {
return "Hello" + name;
}
}
{code}
Here we need to be in sync with JCache specification. In my understanding of the spec the cache name is required for {{@CacheRemoveEntry}} and {{@CacheRemoveAll}} (but currently in the API there is a default value). For {{@CacheResult}} if no cache name is defined a default one is used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month