*IMPORTANT* - bugfix sync_append_commit index breakage

Bron Gondwana brong at fastmail.fm
Sat Sep 1 19:47:57 EDT 2007

On Sat, 01 Sep 2007 13:08:00 -0400, "Ken Murchison" <murch at andrew.cmu.edu> said:
> David Carter wrote:
> > On Sat, 1 Sep 2007, Ken Murchison wrote:
> > 
> >> I applied this patch to CVS, but I'm wondering why the original code 
> >> writes directly to the existing cyrus.index instead of a 
> >> cyrus.index.NEW, as is done in other places.  I don't know if this was 
> >> intentional by the previous authors, or an oversight.  I'm going to 
> >> investigate.
> > 
> > Doesn't cyrus.index.NEW only kick in on expunge?
> I believe so.  If we also used it for appends, we wouldn't run into the 
> problem that Fastmail is seeing.  But, it may be too much of a 
> performance hit.

Speaking of which, is there any reason why cyrus.expunge isn't sorted
by UID?  We have to rewrite the entire cyrus.index each time we do an
expunge anyway.

Sorted by UUID would help enormously for things like not blatting the
\Seen state for expunged messages until they're expired, because you
could then just do a double-iterator over the two "index format" files.

I don't think that any of the code does the .NEW for appends because that
makes append O(N) where N is the mailbox size, and that would suck for
huge mailboxes.

  Bron Gondwana
  brong at fastmail.fm

More information about the Cyrus-devel mailing list