MESSAGE quota resource implemention

Julien Coloos julien.coloos at atos.net
Mon Sep 5 13:19:00 EDT 2011


Le 05/09/2011 12:06, Bron Gondwana a écrit :
> On Mon, Sep 05, 2011 at 02:32:40PM +1000, Greg Banks wrote:
>
>>   - add a 32b mailbox index header entry to track the storage in bytes
>> used by all annotations for the mailbox itself or for messages in the
>> mailbox
> Why not 64b?  Admittedly hanging gigabytes of annotations off a single
> folders is probably evil, but this is the mailbox header - 4 bytes per
> mailbox to not even have to think about it is super-cheap.  We keep a
> handful of "blanks" around in the header already.
>
> ...
>
>>   - in mailbox_commit_quota(), if the field is not "unknown", then
>> calculate the delta in usage and apply to the quota db.
>
This new field seems useful for the quota utility and when setting a new 
quotaroot: it wouldn't need to check each annotation associated to the 
mailbox (or messages) and would rely on that field, as it currently does 
for total message size and now the number of messages (with my patch).
I don't know what other people do with cyrus, but here those two 
situations do not happen that often:
   - quotaroot is usually set once upon creating the user mailbox
   - quota utility is rarely used, and usually on one mailbox at a time
So maybe I am missing something, but my question would be: is it really 
worth it ?


Regards
Julien


More information about the Cyrus-devel mailing list