On 05/09/11 20:16, Greg Banks wrote: > On 02/09/11 20:03, Bron Gondwana wrote: >> On Fri, Sep 02, 2011 at 07:36:20PM +1000, Greg Banks wrote: >> >>> How's about this for a strategy? >>> >>> When a quota resource is first enabled, (i.e. the limit is changed from >>> UNLIMITED to some finite value), the usage is stored as some special >>> value which I'll call INDETERMINATE. >> >> What about 'getquota'? I don't support any solution which leaves getquota >> returning bogus values or failing to respond. That's just icky and >> confusing. >> >> I don't think you can avoid two passes, and I don't even think you can >> avoid two values during if you really want to be good about it. >> >> [...] >> >> There are pure ways to do this, that guarantee consistency. [...] >> >> That's a real, robust solution. But it's pretty heavy engineering. > > After some thought, I agreed, decided it's quite doable, and decided to > start. I have an implementation coded, so far the hardest bit is testing it.
Implemented, tested, and I'd appreciate a review. https://github.com/gnb/cyrus-imapd/commit/af8d5bd3b40c4cb49fb7c943c85cb0aeab209215 https://github.com/gnb/cassandane/commit/c529f745b51aa0b566020ecbffca774e783124ee https://github.com/gnb/cassandane/commit/569eea2b9a2ad56b98c3c5cea60509689fa49bad -- Greg.