]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mdbox: Added a comment about how expunging works.
authorTimo Sirainen <tss@iki.fi>
Mon, 19 Apr 2010 13:31:50 +0000 (16:31 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 19 Apr 2010 13:31:50 +0000 (16:31 +0300)
--HG--
branch : HEAD

src/lib-storage/index/dbox-multi/mdbox-sync.c

index d1705a000f2226df7fe4528b6bcf547ee7cdeef2..b9bfa25a4e02a5cce677e30e55825e39eb295c43 100644 (file)
@@ -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"