[Dovecot] Corrupted indices (and accidental checkin)

Thomas Wouters thomas at xs4all.net
Wed Jul 20 18:46:13 EEST 2005


I've seen a number of corrupted-index problems pop up on our test-dovecot
servers (used by a few people at the office), and I'm wondering why corrupt
indices don't just automatically get deleted ? Something like:

        if (!MAIL_INDEX_IS_IN_MEMORY(index)) {
                unlink(index->filepath);
        }

in src/lib-index/mail-index.c:mail_index_set_error() comes to mind. It seems
to me like it should work, anyway. You can still treat the error like it's
currently treated (as fatal), but at least it won't pop up the next time you
try to perform the same action, or trigger the same corrupted entry another
way.

By the way, I also noticed what is probably an accidental checkin in
src/lib-storage/index/maildir/maildir-storage.c:maildir_get_control_path(),
where it tries to migrate control files from the default location to the
configured location. I think Timo wrote that patch for my colleage Cor, and
then accidentily checked it in with:

----------------------------
revision 1.100
date: 2005-06-09 14:31:43 +0000;  author: cras;  state: Exp;  lines: +22 -4
Replaced ':' and ',' character usages with #defines, so they can be changed
easily if needed.

The patch is 'broken' anyway; it tries to use rename() to move the old
control files to the new location, but that doesn't quite work between
different filesystems (and that happens to be what we want to do ;). A
better way to handle it would probably be to read in the data from the old
location, and then write it out to the new location, in a normal load/save
procedure. But I think we'll just do the move manually, after all, as it's
just a few dozen different accounts at the moment. I'm not sure about the
value of the 'implicit' controlfile migration that dovecot currently does.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



More information about the dovecot mailing list