[infinispan-dev] optimistic locking :: Flag.FORCE_WRITE_LOCK

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] optimistic locking :: Flag.FORCE_WRITE_LOCK

Mircea Markus
Hi,

In default mode, when:
advancedCache.withFlags(Flag.FORCE_WRITE_LOCK).get("k")
gets executed a W lock is acquired on "k". With the new optimistic locking model we only acquire a locks at prepare time, so the semantic of the above call might need to change.
What I have in mind is to force the W lock acquisition to happen but only at prepare time - how does that sound?

Cheers,
Mircea
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] optimistic locking :: Flag.FORCE_WRITE_LOCK

Manik Surtani
That would work, but that would be of limited value and pretty meaningless.

Perhaps just document the FORCE_W_L flag to only be respected in a pessimistically locked cache?

On 5 Sep 2011, at 10:13, Mircea Markus wrote:

> Hi,
>
> In default mode, when:
> advancedCache.withFlags(Flag.FORCE_WRITE_LOCK).get("k")
> gets executed a W lock is acquired on "k". With the new optimistic locking model we only acquire a locks at prepare time, so the semantic of the above call might need to change.
> What I have in mind is to force the W lock acquisition to happen but only at prepare time - how does that sound?
>
> Cheers,
> Mircea
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev