[infinispan-dev] Let me understand DIST

Dan Berindei dan.berindei at gmail.com
Tue Mar 13 08:44:38 EDT 2012


On Tue, Mar 13, 2012 at 1:53 PM, Galder Zamarreño <galder at redhat.com> wrote:
>
> On Mar 12, 2012, at 2:03 PM, Dan Berindei wrote:
>
>> On Sat, Mar 10, 2012 at 7:07 PM, Bela Ban <bban at redhat.com> wrote:
>>> Can you confirm that my understanding of how DIST works is correct ?
>>>
>>>
>>> #1 Non transactional modifications
>>> - E.g. a PUT
>>> - The PUT is sent to the primary owner (e.g. B) and all backup owners
>>> (e.g. C) and is applied immediately, with only local lock acquisition
>>> (lock-put-unlock)
>>
>> This is correct, the key lock is acquired in parallel on all the
>> owners, so two concurrent PUTs could result in different owners having
>> different values.
>
> Lock acquired in all owners? I thought we only acquired lock in a single node now, the main owner.
>

We do that for 2PC transactions, where we can wait with the commit on
the backup owners until the primary owner acquires the lock.

If we did block the write on the secondary owners until we had
acquired the lock on the primary, that would mean using 2.5 RPCs:
write on primary synchronously, write on backups synchronously,
release locks async. That's quite close to the transactional cache
overhead, so why not use a transactional cache instead?

The current design does leave the door open for inconsistencies betwen
owners, but I don't think we want to guarantee that for
non-transactional caches anyway.

Cheers
Dan



More information about the infinispan-dev mailing list