MESSAGE quota resource implemention
julien.coloos at atos.net
Wed Sep 14 13:14:33 EDT 2011
Le 12/09/2011 23:09, Bron Gondwana a écrit :
>> - for 'old' mailboxes (those created before the annotation storage
>> usage field in the index header), current annotations usage shall be
>> computed (and added to the quota entry) upon upgrading; this way
>> users won't have to run 'quota -f' for all quotaroots after
>> switching to this new version ;)
> Definitely. Upgrading usually handles things like that. It's
> the right way[tm].
Pushed a few lines of code in the 'upgrade_index' function. Though it
still lacks the annotation storage usage computing.
It's in the branch 'gnb/annotate/fixes'; commit
>> Actually I just gave up the 'old' test: there is no easy way to
>> simulate upgrading mailbox index, or at least I don't feel confident
>> enough to make it in cassandane :(
> Easiest way is the same way I did for the broken quotas test.
> Have a tar file with the contents of the "old mailbox" which
> you unpack onto the filesystem, and then open the mailbox and
> check that the "upgraded" fields are what you would expect.
> I also did something similar for the "crash on thread" test,
> where there were 5 messages which were known to be able to
> crash the THREAD command. I unpacked the folder contents
> with those messages in a test.
Nice idea :)
Pushed a few things.
Added an option hash so that when running commands:
- test can run system commands (based on the current code which would
run cyrus commands inside the current cassandane instance directory)
- finer I/O redirections are possible
- working directory can be specified
While adding those new 'features', I still kept the 'run_utility' method
(cyrus commands) and simply added the 'run_command' method for other
Then, as you suggested on IRC, I added an 'unpack' method to extract
tar/gz/bz2 (and combinations) files using system commands.
And I added back my quota upgrade test from a cyrus v2.4(.11) mailbox,
using two tar.gz files containing a mailbox content and its quota file.
It's in the 'quotamessage/gnb/annotate' branch; commits
Maybe you won't keep everything I pushed, but I hope some parts will be
More information about the Cyrus-devel