[Mailman-Developers] race condition in locking ?

Thomas Wouters thomas@xs4all.net
Sun, 6 Feb 2000 12:36:44 +0100


On Sat, Feb 05, 2000 at 11:21:30PM +0100, Thomas Wouters wrote:

> You should see some 'stolen!' or (in my LockFile version) 'broken!'
> messages, in your logs/locks file.

Er, apparently not. Somehow some logmessages got lost during the move from
lock() to __break() ;P If you want to be sure, you can add something like
this by hand:
	self.__writelog("stealing lock (from %s)"%winner)

As for the locking problem, I think I see a better solution. A site-global
'lock lifetime multiplier' that the site admin can set, by which both the
lifetime values of lockfiles and the lock timeout values given to
LockFile.lock() are multiplied. By leaving the default to 1 we leave
everything the same, but when a slow site is experiencing expired but still
used locks, they can up the multiplier and get consistent behaviour all
'round -- no spurious locktimeout errors because lifetime is high but
timeout isn't :P

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!