[infinispan-dev] Passivation and BCHM WAS: fixing eviction with transactions (critical for Hibernate Search)

Manik Surtani manik at jboss.org
Fri Jun 17 07:31:45 EDT 2011


On 17 Jun 2011, at 11:03, Mircea Markus wrote:

>> 
>> 2) EvictionStrategies ensure passivation occurs *before* removing an entry from the BCHM
> Does this cover the following scenario?
> 1. thread1.get determines that K needs to be passivated 
> 2. thread2 remove(k) removes it from memory
> 3. thread1. passivates it to disk then removes it from memory as well (no op)
> 4. thread3.read(k) returns a value - wrong.
> 
> I think this won't happen as along as we have a lock on K for the passivate-then-delete-from-data-container operation. AFIK we don't do that ATM.

Yes, a valid point.  So that lock may still be necessary after all.

--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org






More information about the infinispan-dev mailing list