Large Mailbox Append Fix

Bron Gondwana brong at
Mon Sep 24 18:34:26 EDT 2007

On Mon, 24 Sep 2007 13:53:28 -0400, "Ken Murchison" <murch at> said:
> Bron Gondwana wrote:
> > On Sat, 22 Sep 2007 10:44:55 +0100 (BST), "David Carter" <dpc22 at> said:
> >> On Sat, 22 Sep 2007, Bron Gondwana wrote:
> >>
> >>> We still need to sync the final last_uid, which may be greater than
> >>> the UID of the maximum message.
> >> Oops, yes. Replacing last_uid for the last batch should be good enough.
> >>
> >>> (though I think there's a separate check later that does that if they
> >>> still don't match... I really should test-case this!)
> >> I don't think so. There is a separate test for UIDLAST if 
> >> do_mailbox_work() finds that it has no messages to UPLOAD.
> > 
> > Yeah, you're right.  I've got a simpler rewrite of the patch here that
> > does update_uidlast(mailbox) at the end if there's nothing in the
> > index_list.
> Attached is my rewrite against CVS.  I removed duplicate code that 
> resulted from having one for() loop with a special case if() inside (It 
> not uses a for() loop nested inside a do() loop).  The patch doesn't 
> look simpler because my version of diff appears to be braindead.

This still doesn't guarantee to update UIDLAST in the pathological case
where there are exactly max_count messages to be uploaded, not including
the final message in the list due to a UUID/GUID matchup - at least not
according to my reading of it.

  Bron Gondwana
  brong at

More information about the Cyrus-devel mailing list