[infinispan-issues] [JBoss JIRA] (ISPN-2164) Return value of Cache.remove(key) not consistent in transactional context
Mircea Markus (JIRA)
jira-events at lists.jboss.org
Mon Jul 23 10:10:07 EDT 2012
[ https://issues.jboss.org/browse/ISPN-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707293#comment-12707293 ]
Mircea Markus commented on ISPN-2164:
-------------------------------------
@Carsten
With optimistic tx and REPETABLE_READ (or less) we only perform write skew check on the entries that were explicitly read.
When/if SERIALIZABLE isolation level will be in place, that check will also be performed on the written key - that would be required in order to make sure that each transaction sees the same "world" from the beginning to the end - but we don't have such a strict requirement with REPETABLE_READ.
I think your workaround is valid and it doesn't add any performance burden, as during the remove, the cache doesn't do an RPC, but returns the value that was cached locally during the get.
> Return value of Cache.remove(key) not consistent in transactional context
> -------------------------------------------------------------------------
>
> Key: ISPN-2164
> URL: https://issues.jboss.org/browse/ISPN-2164
> Project: Infinispan
> Issue Type: Bug
> Components: Core API, Transactions
> Affects Versions: 5.1.5.FINAL
> Reporter: Carsten Lohmann
> Assignee: Galder Zamarreño
> Labels: jdg, jdg6
> Fix For: 5.2.0.FINAL
>
>
> I have a scenario where multiple threads attempt to remove the same key concurrently via "cache.remove(key)" (each thread having explicitly started a transaction).
> I expect only one thread to succeed, ie. only one invocation of "cache.remove(key)" to return a non-null value.
> But that is not the case, the return value of "cache.remove(key)" is non-null for more than one thread.
> In that sense, "cache.remove(key)" seems to behave differently from "cache.remove(key, value)".
> The bug can be reproduced by using a test analogous to the one in "DummyTxTest" (ISPN-2077), but using "cache.remove(key)" instead of "cache.remove(key, value)".
--
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