[Dovecot] 1.0-test17 Maildir bug
Timo Sirainen
tss at iki.fi
Sat Jun 19 21:47:47 EEST 2004
On 19.6.2004, at 20:50, Moe Wibble wrote:
>> Actually it is a syncing problem, but not like the others. It happens
>> when Dovecot tries to update maildir (flags, expunges) but finds out
>> that some file is missing, so it tries to sync the maildir to find it.
>> Except it is already in the middle of syncing index, so it crashes.
>> Have
>> to think a while what is the right fix for this.
>
> Sounds confusing.
> Shouldn't the index-sync just be delayed if there's one in progress
> already?
> I imagine something like while ( log->index->log_locked ) usleep(500);.
> After all it's locked, isn't it?
But it's then syncing the index itself, so sleeping wouldn't help :) It
basically goes like:
- begin index sync
- commit each change to maildir
- maildir files may change their names, so if it's lost, we have to
find it again:
- read everything in maildir and store them
- begin index sync, so we can store the changes in it
- oops, we're already syncing index, crash
- finish index sync
Anyway, the fix was pretty simple. Just update the maildir filenames
and leave the index syncing later.
I'll release test19 sometimes later after some more mbox fixes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20040619/ae8536e4/PGP.pgp
More information about the dovecot
mailing list