Strategy for supporting large message folders

Kent James kent at
Wed Jan 23 20:27:56 UTC 2013

On 1/17/2013 3:17 PM, David Bienvenu wrote:
> On 01/17/2013 03:05 PM, Kent James wrote:
>> On 1/17/2013 11:54 AM, David Bienvenu wrote:
>>> msgKey is used as a key in the nsIMsgDatabase to get the msg hdr for 
>>> a particular key, so yes, it's still used in all sorts of places in 
>>> the code, but should not be used as the offset into the berkeley 
>>> mailbox. If it were, maildir support would not work at all, instead 
>>> of only kinda working.
>> The key is not used as the offset into the berkeley mailbox, but 
>> isn't the offset used to generate the key,
> Only if the offset is well less than 4GB. If it's approaching 4GB, 
> then we just start assigning keys one by one, as available, and lose 
> backwards compatibility of .msf files with pre-pluggable store 
> versions of TB. Iirc, we save the last million 32 bit keys for 
> assigning message keys to messages with offsets > 4GB. So we've 
> replace the 4GB limit with a limit of a million messages per folder 
> (plus however many messages fit in the first 4GB).
> Since pluggable stores have been out for a while, perhaps we don't 
> care so much about backwards compatibility, and can just dole out keys 
> one by one. You should be able to change the code that picks messages 
> keys when adding new messages w/o bothering versions of TB with 
> pluggable store turned on.
Based on David's response above, and as I discussed at the bi-weekly 
meeting, I think that I will investigate once more whether it is 
feasible to support large mbox folders before I look at maildir.


More information about the tb-planning mailing list