Large Mailbox Append Fix

Ken Murchison murch at andrew.cmu.edu
Fri Sep 21 10:56:28 EDT 2007


Bron Gondwana wrote:
> On Thu, 20 Sep 2007 10:56:59 +0100 (BST), "David Carter" <dpc22 at cam.ac.uk> 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.
> 
> Attached is a patch that does both of these :)  It's possible that I haven't
> done code-path coverage in my limited testing (it's on our test machine) so
> a bit of review is probably in order!

What happens if the total number of messages to upload is a multiple of 
max_count?  Our last batch will be handled inside of the for() loop, and 
then we'll call index_list_work() with an empty list, correct?

-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University


More information about the Cyrus-devel mailing list