On Thu, Apr 29, 2010 at 04:26:38PM +1000, Robert Mueller wrote: > > Besides, they only matter within the non-user folders now. > > Yeah, but just because most of our folders aren't shared, doesn't mean > that there aren't environments out there where most folders *are* > shared. Want to make sure we're not doing something that'll be obviously > dangerous in other types of uses.
True - though one big DB isn't inherently more dangerous than individual small DBs (assuming your DB engine isn't as broken as skiplist used to be) Even in a massively shared environment I suspect it would be on a similar order of size to mailboxes.db. Sure you could generate a pathological case if you really wanted to... > > More interesting is the potential for clashes during replication, > > which would generate a rename event across users. That could get > > super-ugly! > > Oooo, user renames will be a bit ugly! It wouldn't even be a user rename, it would be a rename user.a.foo to user.b.bar. Should be pretty unlikely though because sync will bail out if it discovers multiple folders with the same uniqueid within a session. At least - it will by the time I've finished fiddling with it, if it doesn't already :) > > But it's not a high risk - the adhoc uniqueid is a hash of the > > folder name concatenated with the uidvalidity, so you'd have to have > > a hash collision and creation at the same second. Restore from > > backup after a rename is the disaster case. The best way to protect > > against that is to move the cyrus.header data into a central DB and > > scan it for matches before creating an entry. Either key an "index" > > db against the uniqueid directly, or just do a full table scan. The > > IMAP "LIST" command already does a full table scan, so it can't be > > TOO expensive :) > > Do you really want another db? And "restore from backup after rename" > has to be incredibly rare case, it's not worth worrying about. I'd like a central register of uniqueids - even if it's just in mailboxes.db. Mind you, I'd like to stick UserFlags in a DB as well and do away with the cyrus.header file completely :) Be interestingly messy that would. I'm not doing it for 2.4.0, that's for sure! Bron.