aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/MailList.py15
-rw-r--r--NEWS6
2 files changed, 18 insertions, 3 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 504effa7..0e9ac390 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -599,8 +599,16 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
# file doesn't exist, we'll get an EnvironmentError with errno set
# to ENOENT (EnvironmentError is the base class of IOError and
# OSError).
+ # We test strictly less than here because the resolution is whole
+ # seconds and we have seen cases of the file being updated by
+ # another process in the same second.
+ # Even this is not sufficient in shared file system environments
+ # if there is time skew between servers. In those cases, the test
+ # could be
+ # if mtime + MAX_SKEW < self.__timestamp:
+ # or the "if ...: return" just deleted.
mtime = os.path.getmtime(dbfile)
- if mtime <= self.__timestamp:
+ if mtime < self.__timestamp:
# File is not newer
return None, None
fp = open(dbfile)
@@ -618,8 +626,9 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
return None, e
finally:
fp.close()
- # Update timestamp
- self.__timestamp = mtime
+ # Update the timestamp. We use current time here rather than mtime
+ # so the test above might succeed the next time.
+ self.__timestamp = int(time.time())
return dict, None
def Load(self, check_version=True):
diff --git a/NEWS b/NEWS
index 48f7f907..5edb665e 100644
--- a/NEWS
+++ b/NEWS
@@ -66,6 +66,12 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - A problem with the logic avoiding unnecessarily reloading a current list
+ object from the config.pck arises if the list is updated by another
+ process within the same second that it was last read/written. That can
+ cause the reading of latest version of the list to be skipped. This has
+ been fixed. Bug #862675.
+
- Fixed bin/export.py to accept case insensitive password schemes.
Bug #833134.