[
https://issues.jboss.org/browse/ISPN-3048?page=com.atlassian.jira.plugin....
]
Pedro Ruivo commented on ISPN-3048:
-----------------------------------
hi [~pferraro]
I'm not convinced that the eviction needs to be transactional. It happens under the
segment lock in the hash map and it is saved to disk before it is removed from the [in
memory] map. Also, if a retrieve operation happens at the same time and the entry is not
longer in memory, it is going to look at the cache loader. So, looking at the code, I
don't see where the retrieve operation can return null but I'm going to try to do
some tests around it.
Anyway, do we have any some kind of discussion to turn the eviction transactional?
personally, I don't like the idea...
finally, are you sure that you are not hitting this:
https://issues.jboss.org/browse/ISPN-3694
Does it happen with passivation disabled?
thanks!
Eviction needs to be transactional
----------------------------------
Key: ISPN-3048
URL:
https://issues.jboss.org/browse/ISPN-3048
Project: Infinispan
Issue Type: Bug
Components: Eviction
Affects Versions: 5.3.0.Alpha1
Reporter: Paul Ferraro
Assignee: Pedro Ruivo
Priority: Critical
Labels: 620
Fix For: 6.0.0.Final
Currently, Infinispan eviction is non-transactional. This makes Infinispan's
eviction manager virtually unusable, since non-transactional eviction can cause phantom
reads and data loss because it violates the isolation of concurrent transactions. This is
especially problematic when using a passivation-enabled cache store. In this case, a
cache eviction/passivation can cause a concurrently executed cache retrieval to return
null - even though the act of passivation does not change the data - it only changes where
it is stored.
We work around this in the AS by performing eviction manually, using pessimistic locking
in combination with eager lock acquisition prior to eviction. This is unfortunate, since
it prevents me from leveraging Infinispan's build-in eviction strategies.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira