From: Timo Sirainen Date: Mon, 19 Apr 2010 13:31:50 +0000 (+0300) Subject: mdbox: Added a comment about how expunging works. X-Git-Tag: 2.0.beta5~103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c977374bd4651cafc1626ebe308aa66dfd8b30e0;p=thirdparty%2Fdovecot%2Fcore.git mdbox: Added a comment about how expunging works. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox-multi/mdbox-sync.c b/src/lib-storage/index/dbox-multi/mdbox-sync.c index d1705a000f..b9bfa25a4e 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-sync.c +++ b/src/lib-storage/index/dbox-multi/mdbox-sync.c @@ -1,5 +1,17 @@ /* Copyright (c) 2007-2010 Dovecot authors, see the included COPYING file */ +/* + Expunging works like: + + 1. Lock map index by beginning a map sync. + 2. Write map UID refcount changes to map index. + 3. Expunge messages from mailbox index. + 4. Finish map sync, which updates head=tail and unlocks map index. + + If something crashes after 2 but before 4 is finished, head != tail and + reader can do a full resync to figure out what got broken. +*/ + #include "lib.h" #include "array.h" #include "ioloop.h"