"reconstruct -k" is broken when delayed expunge enabled

David Carter dpc22 at cam.ac.uk
Tue Dec 18 08:00:41 EST 2007


Take a mailbox with 2 messages.

Expunge the second message and then the first. "reconstruct -k" will 
generate a mailbox where the second message appears in both cyrus.index 
and cyrus.expunge. Not good, especially when cyrus_expire -X cuts in.

A trivial fix:

http://www-uxsup.csx.cam.ac.uk/~dpc22/cyrus/patches/2.3cvs/reconstruct.patch

A slightly more ambitious fix, using the fact that both uid[] and expuid[] 
have been sorted into order of ascending UID:

http://www-uxsup.csx.cam.ac.uk/~dpc22/cyrus/patches/2.3cvs/reconstruct2.patch

I believe that the second patch matches the intent of the original code.

-- 
David Carter                             Email: David.Carter at ucs.cam.ac.uk
University Computing Service,            Phone: (01223) 334502
New Museums Site, Pembroke Street,       Fax:   (01223) 334679
Cambridge UK. CB2 3QH.


More information about the Cyrus-devel mailing list