From Cyrus

Jump to: navigation,

Owner Seen

[Page Tools]

Executive Summary

Store the seen state for the owner of the mailbox (or everyone if sharedseen is set on the mailbox) Retain non-owner seen state in the $user.seen file still Reduces IO in the common case, both reading and writing the mailbox.

Detail

Now that we have CONDSTORE enabled everywhere, a seen update always causes a write to both the index record and the index header anyway.

Per-user seen is broken with CONDSTORE anyway, because you can't see if the seen flag has changed for a message - so modseq bumps happen even though nothing has actually changed for every other user.

The "anyone.seen" file can get huge if lots of folders have sharedseen enabled.

Recovering seen state when undeleting messages sucks.

So - if the user owns the mailbox (is in user.$username namespace) then store a flag in the index record rather than opening the seen database.

Will detail the index changes later! It requires a couple of header field changes only, nothing new to index records (other than another system flag!)