READ => WRITE lock.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jul 2 12:48:02 CDT 2003


on 7/1/03 20:41, Charles Yeomans at yeomans at desuetude.com wrote:

> 
> On Tuesday, July 1, 2003, at 01:00 PM, Ruslan Zasukhin wrote:
> 
>> on 7/1/03 19:20, erne at ernestogiannotta at tiscalinet.it wrote:
>> 
>>> what's the need of a READ ONLY lock?
>> 
>> If one cursor do READ lock,
>> Then other cursor cannot set WRITE lock,
>> But still can set READ lock, this is why it is named also SHARED
> 
> So if cursor2 sets a READ lock, then cursor1 cannot set a WRITE lock,
> even though it has a READ lock?  But once, say cursor1 releases its
> READ lock, then cursor2 can get a WRITE lock?

Hi Charles,

I have think more about this.

In your above words, you mean CHANGE OF STATE for cursor.
This do not works.

Cursor is born as read-only, and it will die as read only.
Cursor cannot change its state from READ to WRITE.
You need use second cursor for changes.

At least this is current way in Vserver 2.0 alpha.

--------
In future we have think about adding more Record Lock Types.
For example: "Intention on Write Lock"

If record have READ lock, we cannot set WRITE lock,
But we will be able set "Intention on Write" lock,
then nobody else will not be set other ERAD lock on this record.

This give us ability stop escalation of READ locks, so with time we have
100% sure that we get access to this record as only all REAL locks existed
before will be removed.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list