[Mailman-Developers] race condition in locking ?

Thomas Wouters thomas@xs4all.net
Mon, 7 Feb 2000 22:59:07 +0100


On Mon, Feb 07, 2000 at 09:31:44PM +0100, Ricardo Kustner wrote:

> I wonder though what happens if some impatient moderator decides not to
> wait before the page finnishes loading, switches to a differen webpage and
> therefor breaks the python cgi process... will some approved posts stay in
> the queue instead?

Try it out ! ;) It depends on the exact behaviour of both the webbrowser and
the webserver. I haven't checked the Mailman code but i assume it either
continues with its jobs until it tries to write output, usually at the end
of the script, or it gets a signal and cleans up nicely. Postings shouldn't
disappear, if that's what you mean.

> I mentioned before that I think that it could be better if the cgi scripts
> don't do anything more than just "mark" message as being approved... cgi
> scripts should have a short life time and definately shouldn't be waiting
> for something too long...

I agree, and I think I've seen more comments and postings talking about it.
Noone has implemented it yet, though, and the current method works too well
for it to be a rela problem, I guess ;)

> btw i used the original LockFile.py this time...

Go ahead and try it with mine -- it should make the waits you have to endure
a tad shorter. The problem with the old locking mechanism is that a lot of
processes end up butting heads in a painful way when they try to grab the
lock. In the modified one, the first process to try and get the lock after
it is freed, actually gets the lock.

-- 
Thomas Wouters <thomas@xs4all.net>

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