Hi,
Originally posted by Daniel Chen:
Hi Sai & Vikas,
Yes I implement the unreference method to unlock whole db.But I only used a Vector to store reocrd number that is locked without store client id.I don't know why many do it.I found some article said when call unlock method, they would compare the client id want to unlock the record to stored in hashmap's client id.If they are not same, do nothing.And I cannot think out any else advantage than using a Vector only store record number.Is it right?
If I am right, I doubt the worthty to do.When a client unlock the record that it isn't locked by itself?I don't think it will happen in my design.
If I am wrong, anything else I missed?
I cant tell u much this way,untill u explain how u are doing ur locking.As much as i have understood from the specs and the various discussions i have had is that a client locking a record should be the one unlocking it.For having an insight to how i have done it check out my thread about locking Design by the name of
My lock Design!
I have used a clientid to represent a client asking for a lock.
Hope it helps
VikasSood