~mailman-coders/mailman/2.1

  • Committer: msapiro
  • Date: 2006-07-22 01:53:41 UTC
  • Revision ID: vcs-imports@canonical.com-20060722015341-48ikrnzyd7h02jrw
- bin/unshunt
- Queue/Runner.py
- Queue/Switchboard.py
  Backported the gfiles backup changes from the trunk. The following comments
  are from the trunk checkin.  Note that the test cases are not added.

Added robustness to Switchboards and Runners so that if a runner crashes
uncleanly (e.g. segfaults the Python interpreter), messages being processed
will not be lost.

The vulnerability, ideas, and patches are credited to Richard Barrett and Mark
Sapiro.  Their original work was modified by Barry for this commit and any
bugs are his fault.

The basic idea is that instead of unlinking a .pck file in dequeue(), the file
is renamed to a .bak file.  The Switchboard grows a finish() method which then
unlinks the .bak file.  That class's constructor also grows a 'restore'
argument (defaulting to false), which when true moves all .bak files it finds
in its hash space to .pck, thereby restoring a file lost while "in flight".
This relies on the fact that even with multiple qrunners, exactly one process
will be responsible for one hash space slice, so it's never possible (under
normal operation) for a .bak file to be renamed to .pck by some other process.

Test cases for both the new Switchboard behavior and the use of that by Runner
subclasses has been added.

There are two things to watch out for, either of which may require some
additional changes.  There is some small potential to duplicate messages in
various queues, if say 'mailmanctl' were improperly started more than once by
a site admin.  This usually won't happen unless an admin is overly eager with
the mailmanctl -s switch, so we can chalk this one up to operator error.  I'm
not sure what more we can do about that.

There's also a possibility that if we're processing a message that continually
causes the Python interpreter to crash, we could end up duplicating messages
endlessly.  This is especially troublesome for the Outgoing runner which could
conceivably cause a mail flood.  I consider this the more critical issue to
defend against, probably by adding a numbering scheme to the .bak file names
and refusing to restore a .bak file more than say 3 times without human
intervention.
Filename Latest Rev Last Changed Committer Comment Size
..
admin 1 22 years ago This commit was manufactured by cvs2svn to create Diff
bin 1 22 years ago This commit was manufactured by cvs2svn to create Diff
contrib 1 22 years ago This commit was manufactured by cvs2svn to create Diff
cron 1 22 years ago This commit was manufactured by cvs2svn to create Diff
doc 1 22 years ago This commit was manufactured by cvs2svn to create Diff
Mailman 1 22 years ago This commit was manufactured by cvs2svn to create Diff
messages 1 22 years ago This commit was manufactured by cvs2svn to create Diff
misc 1 22 years ago This commit was manufactured by cvs2svn to create Diff
scripts 1 22 years ago This commit was manufactured by cvs2svn to create Diff
src 1 22 years ago This commit was manufactured by cvs2svn to create Diff
templates 1 22 years ago This commit was manufactured by cvs2svn to create Diff
tests 1 22 years ago This commit was manufactured by cvs2svn to create Diff
.cvsignore 1 22 years ago This commit was manufactured by cvs2svn to create 71 bytes Diff Download File
ACKNOWLEDGMENTS 754 19 years ago bwarsaw Acknowledge Mark Sapiro. 5 KB Diff Download File
BUGS 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 660 bytes Diff Download File
File configure 569 20 years ago bwarsaw Renamed reset_pw to reset_pw.py so that the file l 70.6 KB Diff Download File
configure.in 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 16.8 KB Diff Download File
FAQ 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 14.8 KB Diff Download File
gnu-COPYING-GPL 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 17.5 KB Diff Download File
INSTALL 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 835 bytes Diff Download File
File install-sh 1 22 years ago This commit was manufactured by cvs2svn to create 5.4 KB Diff Download File
Makefile.in 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 4 KB Diff Download File
File mkinstalldirs 1 22 years ago This commit was manufactured by cvs2svn to create 726 bytes Diff Download File
NEWS 914 18 years ago msapiro - Switchboard.py - Closed very tiny holes at t 109 KB Diff Download File
README 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 6.6 KB Diff Download File
README-I18N.en 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 8.1 KB Diff Download File
README.CONTRIB 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 396 bytes Diff Download File
README.NETSCAPE 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 2.2 KB Diff Download File
README.USERAGENT 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 1.7 KB Diff Download File
STYLEGUIDE.txt 416 21 years ago bwarsaw Updates from my online version. 6 KB Diff Download File
TODO 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 7.8 KB Diff Download File
UPGRADING 749 19 years ago tkikuchi FSF office has moved to 51 Franklin Street. 16.8 KB Diff Download File