Large Mailbox Append Fix

Bron Gondwana brong at
Thu Sep 20 10:21:11 EDT 2007

On Thu, 20 Sep 2007 10:56:59 +0100 (BST), "David Carter" <dpc22 at> said:
> On Thu, 20 Sep 2007, Bron Gondwana wrote:
> > Actually, I'm not 100% sure that it's the only way to do things, but it 
> > was not particularly invasive and a small extra amount of CPU time and 
> > memory copying in exchange for a large saving on replica IO has made our 
> > servers a lot happier about users with big mailboxes being moved!
> Definitely an improvement over the repeatupload stuff. It would make
> sense 
> for upload_messages_from() to also use index_list_work(), although the 
> chance of a monster UPLOAD from a normal append is much lower.
> I would prefer sync_index_list_free() to be called in the parent routine 
> upload_messages_list() rather than as a side effect to index_list_work(), 
> but that is probably just personal style.

Sounds reasonable.  I can probably factor that out easily enough.  I'll have
a look tomorrow.  I'll look at adding it to upload_messages_list as well.  It
seems a bit funny to already have a messages list and then allocate yet another
for the actual work, but it does make things very clear about what's happening
where, and you have to walk the list to know the final UID you want to send
unless you change the sync protocol to send last_uid AFTER the messages, which
I didn't want to!

  Bron Gondwana
  brong at

More information about the Cyrus-devel mailing list