[infinispan-issues] [JBoss JIRA] (ISPN-1615) Consider removing transaction suspension code from putForExternalRead()
Mircea Markus (Commented) (JIRA)
jira-events at lists.jboss.org
Wed Dec 14 11:18:09 EST 2011
[ https://issues.jboss.org/browse/ISPN-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650952#comment-12650952 ]
Mircea Markus commented on ISPN-1615:
-------------------------------------
As galder pointed out, the PFER does not guarnatee atomicity as it is async, so my prev comment doesn't stand.
Anyway below is a UT that reproduces another issue to be solved by this fix:
{code}
public class NoAutoCommitAndPferTest extends SingleCacheManagerTest {
@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
Configuration dsc = getDefaultStandaloneConfig(true);
dsc.fluent().transaction().autoCommit(false);
return new DefaultCacheManager(dsc);
}
public void testPferNoAutoCommitExplicitTransaction() throws Exception {
tm().begin();
cache.putForExternalRead("k","v");
tm().commit();
assert cache.get("k").equals("v"); //here is the failure!
}
public void testPferNoAutoCommit() throws Exception {
cache.putForExternalRead("k","v");
assert cache.get("k").equals("v"); //here is the failure!
}
}
{code}
> Consider removing transaction suspension code from putForExternalRead()
> -----------------------------------------------------------------------
>
> Key: ISPN-1615
> URL: https://issues.jboss.org/browse/ISPN-1615
> Project: Infinispan
> Issue Type: Enhancement
> Affects Versions: 5.0.1.FINAL, 5.1.0.CR1
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 5.1.0.CR2, 5.1.0.FINAL
>
>
> The main reason for suspending the transaction was to avoid failures impacting the result of the transaction.
> However, ever since ISPN-1556 has been implemented, any FAIL_SILENT operation (like PFER) won't have an impact on the transaction if it fails, so this transaction suspension is not really needed.
> Removing the suspension code is apparently a performance booster in 2LC.
--
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