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

Barry Warsaw barry at list.org
Wed Aug 6 03:15:20 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 5, 2008, at 9:08 PM, Stephen J. Turnbull wrote:

> 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.

Probably so, but is the optimization still worth it?

> A better way would be to add a serial number.

You'd probably want to store the serial number in the file name so you  
wouldn't have to load the pickle just to get the current serial.  It's  
similar to what happens with the queue files.  But again, I'm not sure  
it's worth it.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkiY+ygACgkQ2YZpQepbvXHdBwCfZRO73w4KiA0FMg6eU3yDU8YN
Y7AAoLE5760wZWw536oMj1zyHMNi8h4a
=w1PV
-----END PGP SIGNATURE-----


More information about the Mailman-Developers mailing list