Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-storage/index/maildir/maildir-sync.c @ 3520:e2fe8222449d HEAD
s/occured/occurred/
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 07 Aug 2005 14:41:19 +0300 |
parents | db29cc6754d5 |
children | e9695ec7925b |
comparison
equal
deleted
inserted
replaced
3519:7addee16b026 | 3520:e2fe8222449d |
---|---|
3 /* | 3 /* |
4 Here's a description of how we handle Maildir synchronization and | 4 Here's a description of how we handle Maildir synchronization and |
5 it's problems: | 5 it's problems: |
6 | 6 |
7 We want to be as efficient as we can. The most efficient way to | 7 We want to be as efficient as we can. The most efficient way to |
8 check if changes have occured is to stat() the new/ and cur/ | 8 check if changes have occurred is to stat() the new/ and cur/ |
9 directories and uidlist file - if their mtimes haven't changed, | 9 directories and uidlist file - if their mtimes haven't changed, |
10 there's no changes and we don't need to do anything. | 10 there's no changes and we don't need to do anything. |
11 | 11 |
12 Problem 1: Multiple changes can happen within a single second - | 12 Problem 1: Multiple changes can happen within a single second - |
13 nothing guarantees that once we synced it, someone else didn't just | 13 nothing guarantees that once we synced it, someone else didn't just |
14 then make a modification. Such modifications wouldn't get noticed | 14 then make a modification. Such modifications wouldn't get noticed |
15 until a new modification occured later. | 15 until a new modification occurred later. |
16 | 16 |
17 Problem 2: Syncing cur/ directory is much more costly than syncing | 17 Problem 2: Syncing cur/ directory is much more costly than syncing |
18 new/. Moving mails from new/ to cur/ will always change mtime of | 18 new/. Moving mails from new/ to cur/ will always change mtime of |
19 cur/ causing us to sync it as well. | 19 cur/ causing us to sync it as well. |
20 | 20 |