nmh-workers
[Top] [All Lists]

Re: locking rcvstore?

2002-07-11 17:10:52

[In a message on Thu, 11 Jul 2002 14:29:20 EDT,
        the pithy ruminations of "Michael Richardson" were:]

 Aside from trashing sequences (which I've experienced on occasion, no idea
why)
 I've run into situations where I wind up doing an "inc" from two difference
sources into the same folder. Usually due to impatience on my part. 

 The result was a mess of two processes using the same message numbers!
 My impression is that inc doesn't do any locking on message numbers, but I
could be wrong.

I think anytime that there is a possibility of multiple processes
writing to the same file, locking should be "enableable".  Even if
it's a command line switch (everyone likes to say "use procmail", but
this is essentially what procmail does: locks file and folders by
default, and you can disable or use a different file for locking if
you choose).

Over the years, we've had a LOT of email being trashed because of lock
problems.  We end up doing arcane workarounds to "fix" it.

You can have timeout's on lockfiles, and "fail".  You can have command
line/compile time options to disable/change locking.  But the sequence
file and the next message should be locked when written.  Oh, and the
mail drop should be locked when it's being inc'ed.

Using "locking" in the shell is only slightly better than no locking
at all. . .

Sean


<Prev in Thread] Current Thread [Next in Thread>