25 Oct
2004
25 Oct
'04
5:58 p.m.
On 25.10.2004, at 17:43, Miquel van Smoorenburg wrote:
Well, there is a lockless way to do readdir, but it would mean buffering the entire readdir output in memory.
Dovecot needs to store them into memory in any case.
This basically just retries until you've done an entire readdir() on the directory without mtime changes.
Sure, but I don't really see that as acceptable solution. The problem usually shows up only when the mailbox is getting read and modified a lot at the same time. The mtime might never stop changing.
In "normal use" it might work well, but so would locking (and locking would be guaranteed to work).
It could help with external changes which don't use Dovecot's locking, but.. Still sounds pretty ugly :)