On Sat, 2007-09-08 at 15:04 +0200, Farkas Levente wrote:
Timo Sirainen wrote:
But since there's still a chance that index files could break (although v1.1 tries harder than v1.0 to fix problems), it would be nice if the flags/keywords were written to metadata block once in a while. So if the index files are lost, flag changes wouldn't be completely lost. Metadata updates of course use disk I/O so they shouldn't be done too often.
I was thinking that the metadata could be updated:
- if IMAP connection has been idling for 4 hours (not changing flags)
- when closing mailbox and there are changes older than 4h
- immediately if there are changes older than 24h (whenever mailbox is being synced, e.g. SELECT/NOOP/STATUS)
Or something like that. Those rules can of course be changed, but I'm not sure if I should bother making them configurable from dovecot.conf. There are already too many settings.
what about a maintanance srcipt/daemon which can be run from cron and every sysadm can decided when and how often he'd like to update metadatas?
That would require keeping the "<mailbox>: <last updated>" information in some central database. Otherwise if you had lots of mailboxes it would waste a lot of disk I/O in such run. And I'm not really interested in creating such a database at least yet. :)