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