[infinispan-dev] FineGrainedAtomicMap - remaining items
Mircea Markus
mircea.markus at jboss.com
Mon Oct 17 18:43:04 EDT 2011
On 17 Oct 2011, at 12:27, Sanne Grinovero wrote:
> On 17 October 2011 10:19, Mircea Markus <mircea.markus at jboss.com> wrote:
>>
>> On 17 Oct 2011, at 09:13, Dan Berindei wrote:
> [cut]
>
>> 2) This one is a bit technical. What should we do if tx1 deletes entire
>>
>> AtomicMap while tx2 updates entries in the same Map. Should we create a
>>
>> new Map and apply deltas to a new fresh map *or* simply discard delta
>>
>> changes because entire Map has been deleted?
>>
>>
>> I would say not simply discard the changes, but throw an exception and
>> roll back tx2 as well.
>>
>> That would work. Also if a FGAM method is called and that FGAM has been
>> deleted/replaced then the FGAM method should throw an exception.
>
> I agree that if it's going to discard the changes then we should have
> the transaction rolled back,
> but are we sure if it makes sense to discard them?
I'm not sure, but I tend to go this way because:
- a AtomicMap within Cache is somehow similar to the way the Cache operates within a CacheManager: if a cache is stopped then all other transactions operating with the cache receive exceptions on calling Cache's method.
- this is somehow counter-intitive and more difficult to implement than the previous approach: unless community specifically asks for this feature IMO we should stick with the simple approach.
> I think that for the use case of OGM both approaches are fine, simply
> because this scenario will not happen.
More information about the infinispan-dev
mailing list