[Dovecot] 0.99.11-test6

Timo Sirainen tss at iki.fi
Mon Aug 25 15:27:46 EEST 2003


On Monday, Aug 25, 2003, at 15:01 Europe/Helsinki, Andreas Aardal 
Hanssen wrote:

>> For read-only mailboxes it's much faster to read a single mbox file
>> than to keep opening multiple maildir files. And when you're only
>> reading mboxes, there's no lock contention.
>
> If a truncation occurs while concurrent processes are reading, how is 
> this
> handled?

There's no truncation with read-only mailboxes of course :)

Anyway, the mbox files themselves will still be read-locked so no-one 
can modify them (if they still do, it breaks of course). It's only the 
indexes that won't be read-locked. Indexes are never truncated, but 
they may be replaced with rename().

I'm actually still wondering a bit if this works. Have to ask from some 
people who really know. The problem is that if I write 123 over XXX, 
can a simultaneous read() return 1X3 in some situation? (1XX, 12X, XX3 
and X23 are fine) That might break my plan..



More information about the dovecot mailing list