Message30740
By stat()'ing the directories, do you mean checking the mtime? I think this isn't safe because of the limited resolution of mtime on filesystems; ext3 seems to have a 1-second resolution for mtime, for example. This means that _refresh() might read a directory, and if some other process adds or deletes a message in the same second, _refresh() couldn't detect the change. Is there some other property of directories that could be used for a more reliable check?
The attached patch implements checking of mtime, but I don't recommend applying it; it causes the test suite in test_mailbox.py to break all over the place, because the process modifies mailboxes so quickly that the mtime check doesn't notice the process's own changes.
I'll wait a bit for any alternative suggestion, and then close this bug as "won't fix".
File Added: mailbox-mtime.patch |
|
Date |
User |
Action |
Args |
2007-08-23 14:50:28 | admin | link | issue1607951 messages |
2007-08-23 14:50:28 | admin | create | |
|