On  6-Mar-2003 07:18 Andreas Aardal Hanssen wrote:
|
| On Wed, 5 Mar 2003, Charlie Brady wrote:
| >
| >The last time I checked, time was still monotonically increasing. How does 
| >"time(NULL)" not guarantee that a UIDVALIDITY of a recreated mailbox is 
| >greater than UIDVALIDITY of the previous incarnation of the mailbox?
| 
| If you have two clients, one deletes a mailbox with 5 messages and another
| client creates it again within one second. New messages in a this mailbox
| will get the same uidvalidity/uid values as the messages in the first
| folder.
| 
| I guess time(NULL) is the best we can provide if there is no info on
| former uidvalidity values, but if we know the former value we should add 1
| to it rather than use time(NULL). Or we could wait one second here too
| :-/.

    And there's still the case of NFS exported mailbox disks, with multiple
    IMAP servers referencing those disks.  A reasonable sysadmin would, of
    course, ensure the clocks on these machines are synchronized, but it's
    still a valid example.

    On platforms that support it, you can use gettimeofday() for sub-second
    precision.

    Of course, leap seconds remain an issue, so if you're going to use time,
    you might as well use TAI.

| (guess you mean submailbox/maildir) Because then they'll be deleted when 
| the mailbox is deleted..

    It's more work for the server, but mailboxes could promote their
    uidvalitity files on deletion.  At the very least, it avoids having
    the inbox maildir from being polluted with so many uidvalidity files.

    If you're going to use a time-based uidvalidity, then the file _can_
    be deleted, assuming 1 unit of time has passed, where unit depends
    on your time measurement precision.
--
-dale

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to