J�r�me Bolliet writes:
Brian Candler wrote:
On Thu, Jan 09, 2003 at 02:54:34PM +0100, Xavier Beaudouin wrote:
Le jeudi, 9 jan 2003, � 14:10 Europe/Paris, Sam Varshavchik a �crit :
[... snip ...]
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.
To move the temporary file, you need to delete the current
courierpop3dsizelist before.
In this case, what is happen if another pop3d process try to access
between the delete and the move.
Well, let's see, shall we?
Quoting from above:
1. It opens and reads the courierpop3dsizelist file (if any)
So there is no collision, no problem, just a single mailbox scan, as the
cache will be considered empty. So the question is how frequently this event
will occur. How frequently do you really get multiple pop3d processes
reading the same mailbox in your installation? Compare this with the time
you save by not having to bother with file locks.
The file is never modified, only replaced in its entirety. That's what
makes
it safe.
Regards,
Brian.
-------------------------------------------------------
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
--
(o_.' J�r�me Bolliet - DRS/Dpt Ing�nierie Internet
//\ Noos - 20, place des vins de france 75614 Paris Cedex 12
V_/_ T�l.: 01.44.87.52.84 Email: [EMAIL PROTECTED]
(s'il n'y a pas de solution, c'est qui n'y avait pas de probl�me...)
-------------------------------------------------------
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
--
Bill Michell
[EMAIL PROTECTED]
-------------------------------------------------------
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