[infinispan-dev] FineGrainedAtomicMap preview
Vladimir Blagojevic
vblagoje at redhat.com
Thu Oct 6 18:27:53 EDT 2011
On 11-10-06 2:46 PM, Mircea Markus wrote:
>
> On 5 Oct 2011, at 22:58, Vladimir Blagojevic wrote:
> Why do we want to distinguish them? Is the FGAM significantly less
> performant than AtomicMap? Otherwise why not just make all the maps
> atomic.
You mean lets forget the legacy AtomicMap and make it fine grained by
default?
> And there's an bug with the current non-fine grained atomic maps maps:
> no WL is acquired when you write to such a map anymore. And it should
> be, here's the UT. https://gist.github.com/1267310
Thanks!
> 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 think before moving forward with the review you'd need to change the
> code to keep modifications in the transaction's scope and only apply
> them during commit.
Right!
>
> Your test fails because on remote put you basically override the map
> that exist on a node with the map that is obtained from the remote node.
You are right. Now I am sending only deltas never overriding one Map
with another and the test passes!
Thanks Mircea!
More information about the infinispan-dev
mailing list