[... snip ...]
Good question... For me this case, this is what I can call race.To move the temporary file, you need to delete the current courierpop3dsizelist before.solaris... With about > 600 000 users, so I may be don't know what I am talking about...Look at the code for handling the cache file.
1. It opens and reads the courierpop3dsizelist file (if any)
2. For all files which are in the mailbox but not in the cache, it works
out the size as before. For all files which are in the cache but not in
the directory listing, they are forgotten about.
3. It then writes the updated cache to a temporary file and then does an
atomic rename to 'courierpop3dsizelist'. At all instants the file is
complete and valid. There is no need to lock the file. There is no
race condition.
In this case, what is happen if another pop3d process try to access between the delete and the move.
On some NFS client (not server) : rename is atomic, but remove (delete) can be atomic or not,
appending gets the same problems as well.
Yeah I agree that *some* opensource NFS client (Linux, FreeBSD for example) gets such call
as atomic, but on Solaris, for example, _only_ rename is atomic, because OS cache read / append
into its local VFS cache before commiting on the NFS server...
That's why I say that rely on some cache files on a maildir loose all the advantages off maildir
on a distributed environment.
Caching in files maybe a good idea, we have moved the cache from NFS to local cache on disk,
this give us same functionality and avoid some race conditions.
Except theses parts I think that courier-imap is a neat work and a good piece of software...
/Xavier
--
Xavier Beaudouin - Unix System Administrator & Projects Leader.
For mail address, please check header of this mail. Spams are not accepted.
Caudium: http://caudium.net/
Making friends with FreeBSD:
Just because the system has panicked doesn't mean that you should panic too
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
