[infinispan-dev] FineGrainedAtomicMap preview

Vladimir Blagojevic vblagoje at redhat.com
Fri Oct 7 11:13:13 EDT 2011


On 11-10-07 12:27 AM, Vladimir Blagojevic wrote:
>> In order to understand the issue I needed to look into the entire
>> code. Here are some observations:
>> - you shouldn't register a sync for applying the atomic map changes.
>> Why? There are several reasons for that, the main one being that with
>> this approach FGAM would't be able to participate in distributed
>> transactions.
>> I don't see where the FGAM's entries that are added within a
>> transaction's scope are merged within the existing entries in the
>> FGAM. What do code does is keep all transaction-scoped entries in the
>> data container's FGAM instance, even if they are not committed.
>> This test fails and it obviously shouldn't:
>> https://gist.github.com/1267303
> Yes it fails. To be honest I did not think we need to support this. So
> for every delta change on AtomicMap I need to keep undo operation
> around? Manik and I completely overlooked this in our brainstorming.
I get it now, of course we need to support this. How AtomicMap 
implemented rollbacks is by invoking cache put with delta key and a 
value of AtomicMap write clone for each write operation on AtomicMap in 
tx scope. If tx rollback got issued you just go back to version before 
writes to AtomicMap and your UT passes as it does for legacy AtomicMap.

However, I can not do this now in fine grained atomic map as we can not 
lock on delta key anymore (we were locking on delta keys because we 
invoked put with delta key an AtomicMap value). I need to talk to Manik 
about this :-)

Vladimir


More information about the infinispan-dev mailing list