[infinispan-dev] input regarding ISPN-2103

Manik Surtani manik at jboss.org
Mon Jun 11 14:25:44 EDT 2012


I had a quick look.  The way AtomicMaps are used is that they are retrieved using the AtomicMapLookup and an AtomicMapProxy is passed back.  This proxy is then used, spanning multiple transactions.  Each caller thread gets its own AtomicMapProxy instance, all referring to a single AtomicHashMap instance which is actually stored in the cache.

So, for readers, just checking whether the AtomicHashMap is null isn't enough since the caller's AtomicMapProxy may have a handle onto an AtomicHashMap that has since been removed.  

I think the 'removed' flag should remain, and if, on the proxy at any given time, removed == true, then:

1.  For an existing transaction, it should allow the OL/PL code handle anything to do with write skews
2.  For a new transaction starting up, re-establish the reference to the AtomicHashMap from the proxy (if it exists), otherwise throw an ISE (new transaction cannot start since it is referring to an instance that doesn't exist anymore).

WDYT?

Cheers
Manik


On 11 Jun 2012, at 11:40, Adrian Nistor wrote:

> Hi,
> 
> would like to gather your comments regarding "ISPN-2103 Concurrent 
> access after removal of an AtomicMap should NOT result in an 
> IllegalStateException when accessed by other threads", 
> https://issues.jboss.org/browse/ISPN-2103.
> 
> I hope the issue description is clear enough otherwise please ask.
> 
> Thanks,
> Adrian
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

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

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






More information about the infinispan-dev mailing list