summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsapiro2006-07-09 03:57:47 +0000
committermsapiro2006-07-09 03:57:47 +0000
commit337beba04cf052acb9f33cc4f1862b2841924973 (patch)
tree9838cde05cc22b3c129500ef3dae61d2bd0e6267
parentb35c41b681648dd8be61d68e1c71d48e149f3389 (diff)
downloadmailman-337beba04cf052acb9f33cc4f1862b2841924973.tar.gz
mailman-337beba04cf052acb9f33cc4f1862b2841924973.tar.zst
mailman-337beba04cf052acb9f33cc4f1862b2841924973.zip
-rw-r--r--Mailman/Queue/Switchboard.py13
-rw-r--r--NEWS6
2 files changed, 15 insertions, 4 deletions
diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py
index d9fc5dc27..4741580e7 100644
--- a/Mailman/Queue/Switchboard.py
+++ b/Mailman/Queue/Switchboard.py
@@ -52,6 +52,9 @@ shamax = 0xffffffffffffffffffffffffffffffffffffffffL
# (when False). Pickles are more efficient because the message doesn't need
# to be re-parsed every time it's unqueued, but pickles are not human readable.
SAVE_MSGS_AS_PICKLES = True
+# Small increment to add to time in case two entries have the same time. This
+# prevents skipping one of two entries with the same time until the next pass.
+DELTA = .0001
@@ -156,9 +159,13 @@ class Switchboard:
filebase = os.path.splitext(f)[0]
when, digest = filebase.split('+')
# Throw out any files which don't match our bitrange. BAW: test
- # performance and end-cases of this algorithm.
- if lower is None or (lower <= long(digest, 16) < upper):
- times[float(when)] = filebase
+ # performance and end-cases of this algorithm. MAS: both
+ # comparisons need to be <= to get complete range.
+ if lower is None or (lower <= long(digest, 16) <= upper):
+ key = float(when)
+ while times.has_key(key):
+ key += DELTA
+ times[key] = filebase
# FIFO sort
keys = times.keys()
keys.sort()
diff --git a/NEWS b/NEWS
index 62e60dd13..8caa28dd4 100644
--- a/NEWS
+++ b/NEWS
@@ -86,7 +86,7 @@ Here is a history of user visible changes to Mailman.
- The processing of Topics regular expressions has changed. Previously the
Topics regexp was compiled in verbose mode but not documented as such
which caused some confusion. Also, the documentation indicated that topic
- keywords could be entered one per line, but these entries were not
+ keywords could be entered one per line, but these entries were not handled
properly. Topics regexps are now compiled in non-verbose mode and multi-
line entries are 'ored'. Existing Topics regexps will be converted when
the list is updated so they will continue to work.
@@ -110,6 +110,10 @@ Here is a history of user visible changes to Mailman.
are not in the character set of the list's language are ignored rather
than causing shunted messages (1507248).
+ - Switchboard.py - Closed very tiny holes at the upper ends of queue
+ slices that could result in unprocessable queue entries. Improved FIFO
+ processing when two queue entries have the same timestamp.
+
2.1.8 (15-Apr-2006)
Security