[infinispan-issues] [JBoss JIRA] (ISPN-1527) Remote transactions are not being removed

Mircea Markus (Commented) (JIRA) jira-events at lists.jboss.org
Mon Nov 21 10:21:42 EST 2011


    [ https://issues.jboss.org/browse/ISPN-1527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644367#comment-12644367 ] 

Mircea Markus commented on ISPN-1527:
-------------------------------------

Here is the problem: when transaction are committed async we also release locks in the commit RPC, but we don't also remove the transaction. The fix is to also remove transactions for caches that use async commits.
                
> Remote transactions are not being removed
> -----------------------------------------
>
>                 Key: ISPN-1527
>                 URL: https://issues.jboss.org/browse/ISPN-1527
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 5.1.0.BETA4
>            Reporter: Galder Zamarreño
>            Assignee: Mircea Markus
>            Priority: Blocker
>             Fix For: 5.1.0.CR1
>
>
> The following configuration leaks remote transactions:
> {code:xml}<?xml version="1.0" encoding="UTF-8"?>
> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:5.1">
>    <global>
>       <transport clusterName="x">
>          <properties>
>             <property name="configurationFile" value="jgroups-tcp.xml"/>
>          </properties>
>       </transport>
>    </global>
>    <default>
>       <transaction
>             transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
>             transactionMode="TRANSACTIONAL" lockingMode="OPTIMISTIC"/>
>       <locking concurrencyLevel="1000" useLockStriping="false" />
>       <clustering mode="r">
>          <sync replTimeout="10000"/>
>          <stateRetrieval fetchInMemoryState="false"/>
>       </clustering>
>    </default>
> </infinispan>{code}
> Why? The transaction completion notification is not being sent around, so remote transactions keep piling up. The code is in AbstractEnlistmentAdapter:
> {code}
>    private void removeTransactionInfoRemotely(LocalTransaction localTransaction, GlobalTransaction gtx) {
>       if (isClustered() && !config.isSecondPhaseAsync()) {
>          final TxCompletionNotificationCommand command = commandsFactory.buildTxCompletionNotificationCommand(null, gtx);
>          final Collection<Address> owners = clusteringLogic.getOwners(localTransaction.getAffectedKeys());
>          log.tracef("About to invoke tx completion notification on nodes %s", owners);
>          rpcManager.invokeRemotely(owners, command, false);
>       }
>    }
> {code}
> Taking in account that the invokeRemotely is called with sync=False, looks to me the if condition should be:
> {code}if (isClustered() && config.isSecondPhaseAsync()){code}
> Otherwise, if the condition is right as it is, who should be responsible of removing remote transactions? It's definitely not responsibility of StaleTransactionCleanupService who should only do its job if nodes have left the cluster, not under normal conditions.
> Just tried my suggested fix and seems to improve things although some remote transactions (a handful out of 250) are still not finished when the caches are shutdown.

--
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

       



More information about the infinispan-issues mailing list