On Oct 23, 2004, at 11:14 AM, Stephen Warren wrote:

Nate Sanders wrote:

I must say, I think you lost me :-]
I understand the concern of having multiple users append the same file with no locking. But I'm not sure I follow either of your guys solutions to get around that..

Ok. The basic idea is that you want everyone to share a single whitelist, which is auto-maintained by TMDA whenever anyone confirms.


The potential problem with this is multiple processes updating the whitelist at the same time.[1]

So, this means we can't have each user have CONFIRM_APPEND set to the same file. This is the only way to guarantee avoiding multiple TMDA processes writing to the file at the same time.

[ ... ]

[1] Note that I base this on the fact that you're not supposed to e.g. edit the whitelist in vi/emacs/... whilst TMDA could be running. Another poster pointed out that TMDA only appends to the whitelist, so it may be safe to have multiple TMDA instances writing to one file. The reason one shouldn't edit in vi/emacs/... could be because one tends to delete/re-order entries whereas TMDA just appends. I'm pretty sure that even multiple processes appending to the same file won't work, and hence I recommend caution attempting this!

Unless TMDA is rather poorly written, I would not expect any issues with multiple TMDA processes appending to the same files simultaneously. I presume that it uses standard Unix streaming buffered IO, and writes in append mode, for the plain text files. If so, this should work fine. In our case, TMDA is executed from procmailrc, procmail is forked anew for every incoming message, and therefore each message has its own instance of TMDA. If TMDA didn't properly handle the issue of possible simultaneous writing to the TMDA text or dbm/data files, it's something we would have heard about quite a while ago I believe, and would be a serious flaw, not something users need to work around.


Larry
--
Lawrence Weeks                                    [EMAIL PROTECTED]
Anabasis Consulting Ltd
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to