[infinispan-issues] [JBoss JIRA] (ISPN-2813) DummyTransaction do not commit is last resource transaction is read-only
William Burns (JIRA)
jira-events at lists.jboss.org
Fri Oct 4 18:47:24 EDT 2013
[ https://issues.jboss.org/browse/ISPN-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Burns updated ISPN-2813:
--------------------------------
Fix Version/s: 6.0.0.Final
(was: 6.0.0.CR1)
> DummyTransaction do not commit is last resource transaction is read-only
> ------------------------------------------------------------------------
>
> Key: ISPN-2813
> URL: https://issues.jboss.org/browse/ISPN-2813
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.1.6.FINAL
> Reporter: Vitalii Tymchyshyn
> Assignee: Pedro Ruivo
> Priority: Minor
> Fix For: 6.0.0.Final
>
>
> Currently HEAD DummyTransaction.java has this code:
> ...
> for (XAResource res : resources) {
> try {
> int prepareStatus = res.prepare(xid);
> transaction.setPrepareStatus(prepareStatus);
> ...
> This means that transaction gets prepare status of the last resource (cache in case of infinispan) enlisted.
> Also it has next code:
> ...
> if (transaction.getPrepareStatus() == XAResource.XA_RDONLY) {
> log.debug("This is a read-only tx");
> } else {
> ... Do commit ...
> ...
> This means that if last resource returned XA_RDONLY (e.g. when on last cache only get was performed) all other resources are not committed.
> For me this results in locks held indefinitely and transaction leak.
> Correct would be to remember prepare status per-resource and act accordinly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list