On 13 Dec 2011, at 16:00, Sanne Grinovero wrote:
On 13 December 2011 13:48, Galder Zamarreño <galder(a)redhat.com>
wrote:
>
> On Dec 13, 2011, at 2:39 PM, Sanne Grinovero wrote:
>
>> Why would you avoid FORCE_WRITE_LOCK ?
>
> Does the following make sense?
>
> tx.begin()
> cache.withFlags(FORCE_WRITE_LOCK).get(…)
> tx.commit()
Yeah it's pointless to use locks if you have a single operation, but I
might want to do more operations in a single transaction.. actually
what's the point of using a transaction if I have only one operation?
WIthout
transaction it is possible that the operation is only partially applied, i.e. on a subset
of numOwners, resulting in inconsistent state.