[infinispan-issues] [JBoss JIRA] (ISPN-7526) Write skew check throws even if the previous value was not read
Dan Berindei (JIRA)
issues at jboss.org
Fri Feb 24 09:44:00 EST 2017
[ https://issues.jboss.org/browse/ISPN-7526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13369027#comment-13369027 ]
Dan Berindei commented on ISPN-7526:
------------------------------------
I'm not convinced this is a bug. I guess it depends on how we define optimistic transactions, but I'd argue that if a part of the transaction reads a key from the cache, we should perform write skew check for that key regardless of where the actual value came from.
> Write skew check throws even if the previous value was not read
> ---------------------------------------------------------------
>
> Key: ISPN-7526
> URL: https://issues.jboss.org/browse/ISPN-7526
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Transactions
> Affects Versions: 9.0.0.CR2, 8.2.6.Final
> Reporter: Radim Vansa
> Assignee: Radim Vansa
>
> When the entry was overwritten without reading previous value and then we read it (this read is handled from the current context), write skew check is still applied and can fail, despite that it's unnecessary.
> {code:java}
> cache.put("k", "init");
> tm.begin();
> cache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES).put("k", "v1");
> assertEquals("v1", cache.put("k", "v2"));
> Transaction tx = tm.suspend();
> assertEquals("init", cache.put("k", "other"));
> tm.resume(tx);
> tm.commit(); // fails with WriteSkewCheckException
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the infinispan-issues
mailing list