[Mailman-Developers] [Mailman-Users] Subscribers suddenly"disappear"

Stephen J. Turnbull stephen at xemacs.org
Wed Aug 6 03:08:33 CEST 2008


Mark Sapiro writes:

 > 1) add_member saves the list with the first member.
 > 2) VirginRunner gets there first, instantiates and caches the list.
 >    It then locks the list, processes the welcome and saves and unlocks
 >    the list.
 > 3) add_member gets the lock, adds the second member and saves the list.
 > 4) Virgin runner gets the second welcome. The list is cached, so it
 >    uses the cached instance. It then locks the list which ultimately
 >    calls MailList.__load() to refresh the list data, but __load()
 >    does
 > 
 >             mtime = os.path.getmtime(dbfile)
 >             if mtime <= self.__timestamp:
 >                 # File is not newer
 >                 return None, None

Shouldn't "mtime < self.__timestamp" do the right thing (much more
often)?  You're still vulnerable to "date -s", adjtime, and friends,
though, and of course you'll have some undesirable cache misses at
times when it would be nice if you didn't.

A better way would be to add a serial number.


More information about the Mailman-Developers mailing list