MESSAGE quota resource implemention
Julien Coloos
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
ed61f721487804b205e399c538fc35ddc153bd93.
>> 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
commands.
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
d2bf4e4f42f7f8c9b53713441116ddbea5b0a265,
86a52daeed5a03f078b88de67d3d10b51a7f8cc4 and
fb827e8fc77529a5e23465d2c19d6e88adf7cae8.
Maybe you won't keep everything I pushed, but I hope some parts will be
helpful :)
Regards
Julien
More information about the Cyrus-devel
mailing list