atom feed24 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: problem couri...
FromSent OnAttachments
Jérôme BollietJan 8, 2003 4:19 am 
Roland SchneiderJan 8, 2003 6:05 am 
Jérôme BollietJan 9, 2003 3:51 am 
Xavier BeaudouinJan 9, 2003 4:28 am 
Roland SchneiderJan 9, 2003 5:09 am 
Sam VarshavchikJan 9, 2003 5:11 am 
Xavier BeaudouinJan 9, 2003 5:54 am 
Jérôme BollietJan 9, 2003 6:37 am 
Brian CandlerJan 9, 2003 7:00 am 
Jérôme BollietJan 9, 2003 7:46 am 
Brian CandlerJan 9, 2003 7:59 am 
Xavier BeaudouinJan 9, 2003 8:04 am 
bi...@mics.org.ukJan 9, 2003 8:15 am 
Jérôme BollietJan 9, 2003 8:43 am 
Matt PavlovichJan 9, 2003 8:56 am 
Brian CandlerJan 9, 2003 9:06 am 
Xavier BeaudouinJan 9, 2003 9:46 am 
Gordon MessmerJan 9, 2003 2:22 pm 
Gordon MessmerJan 9, 2003 2:23 pm 
Sam VarshavchikJan 9, 2003 2:56 pm 
Sam VarshavchikJan 9, 2003 2:56 pm 
Xavier BeaudouinJan 9, 2003 3:49 pm 
Xavier BeaudouinJan 9, 2003 4:03 pm 
Jérôme BollietJan 9, 2003 11:43 pm 
Subject:Re: [courier-users] Re: problem courier pop3d & load average
From:Brian Candler (B.Ca@pobox.com)
Date:Jan 9, 2003 7:59:42 am
List:net.sourceforge.lists.courier-users

On Thu, Jan 09, 2003 at 04:47:21PM +0100, Jérôme Bolliet wrote:

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.

This is simply not true. See "man 2 rename". If you want to find out more, I can strongly recommend the book "Advanced Programming in the Unix Environment" (Stevens, Addison Wesley).

Even if it were true, it wouldn't matter. The other pop3d process would find that the cache file did not exist, so would simply calculate the size of each of the messages in the "slow" way.

Regards,

Brian.